Greedy Algorithms - Monotone Increasing Digits
Given the function
largestMonotoneIncreasing(n) that returns the largest number ≤ n with digits in non-decreasing order, what is the output of largestMonotoneIncreasing(321)?