Question:medium

Four digits of the number \(29138576\) are removed so that the remaining four digits, kept in their original order, form the largest possible number. Which removed digit has the largest value?

Show Hint

Use a greedy method: scan the digits left to right and drop a digit whenever a bigger digit follows it, as long as removals remain, to build the largest number keeping the order.
Updated On: Jul 10, 2026
  • 9
  • 8
  • 7
  • 5
Show Solution

The Correct Option is D

Solution and Explanation

The number given is $29138576$, made of the 8 digits $2, 9, 1, 3, 8, 5, 7, 6$ in that fixed order. We must delete 4 of them and keep the other 4 in their original sequence, so that the leftover 4-digit number is as big as it can be. Then we report the largest digit among the 4 that got deleted.

Think of it position by position instead of using a running list. The final number has 4 slots: thousands, hundreds, tens and units.

  1. Thousands digit: to get the biggest possible number, this slot should hold the biggest digit that still leaves enough digits after it to fill the remaining 3 slots. Scanning $2,9,1,3,8,5,7,6$, the digit $9$ sits at position 2, and after it there are 6 digits left ($1,3,8,5,7,6$), more than enough for 3 more slots. Since $9$ is the biggest digit in the whole string, it goes into the thousands place.
  2. Hundreds digit: now only look at what comes after the $9$, which is $1,3,8,5,7,6$. At least 2 digits must remain after this pick for the tens and units slots. Checking each candidate, $8$ is the biggest digit here that still leaves at least 2 digits after it ($5,7,6$ remain, which is 3). So $8$ goes into the hundreds place.
  3. Tens digit: now only look at what comes after the $8$, which is $5,7,6$. At least 1 digit must remain after this pick. $7$ is the biggest digit here with at least 1 digit left after it (just $6$). So $7$ goes into the tens place.
  4. Units digit: only $6$ is left, so it fills the units place.

Putting the slots together gives the biggest possible remaining number: $9876$.

Let's summarize:

  • The kept digits, in order, are $9, 8, 7, 6$.
  • The full original string was $2,9,1,3,8,5,7,6$, so the 4 digits that got deleted are whatever is left over: $2, 1, 3, 5$.
  • Among the deleted digits $2, 1, 3, 5$, the largest one is $5$.

So the digit removed that had the biggest value is $5$.

Was this answer helpful?
0


Questions Asked in XAT exam