Question:

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
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Step 1: Understand what is being asked.
The number is \(29138576\), which has 8 digits: \(2, 9, 1, 3, 8, 5, 7, 6\).
We remove 4 of these 8 digits, and the 4 digits left behind must stay in their original left to right order.
We want the largest possible 4-digit number from what remains, then we need the largest digit among the ones we threw away.

Step 2: Use a greedy rule to build the biggest remaining number.
Go through the digits one at a time and keep them on a growing list.
Whenever the digit about to be added is bigger than the last digit sitting on the list, and there are removals left to spend, drop that last digit, since it is being beaten by a bigger digit that comes later.
This check makes sure no small digit sits in front of a bigger one, which is exactly what would shrink the value of the final number.

Step 3: Walk through the digits.
Start: keep \(2\). List: \(2\).
Next digit \(9\): since \(9 > 2\), drop the \(2\) (1 removal used). List: \(9\).
Next digit \(1\): since \(1 < 9\), just add it. List: \(9, 1\).
Next digit \(3\): since \(3 > 1\), drop the \(1\) (2 removals used). \(3\) is less than \(9\), so it stays after \(9\). List: \(9, 3\).
Next digit \(8\): since \(8 > 3\), drop the \(3\) (3 removals used). \(8\) is less than \(9\), so it settles after \(9\). List: \(9, 8\).
Next digit \(5\): since \(5 < 8\), just add it. List: \(9, 8, 5\).
Next digit \(7\): since \(7 > 5\), drop the \(5\) (4 removals used, budget finished). \(7\) is less than \(8\), so it stays after \(8\). List: \(9, 8, 7\).
Next digit \(6\): the removal budget is finished, so \(6\) is simply added. List: \(9, 8, 7, 6\).

Step 4: Read off what was removed.
The remaining number is \(9876\), the largest number possible from this digit string.
The four digits removed along the way were \(2, 1, 3, 5\).
The largest value among these four removed digits is \(5\).

Step 5: Check the wrong options.
\(9\), \(8\) and \(7\) were never removed at all, they sit inside the final number \(9876\), so they cannot be the answer.
\(6\) is also part of the final number \(9876\), so it was kept, not removed.
Only \(5\) was actually one of the removed digits, and it is the biggest of the four removed digits \(2, 1, 3, 5\).

Final Answer:
The largest digit that was removed is \(5\).
\[ \boxed{5} \]
Was this answer helpful?
0
0

Top XAT Quantitative Ability and Data Interpretation Questions

View More Questions

Top XAT Number System Questions

View More Questions