Greedy Algorithms - Monotone Increasing Digits
You are given a positive integer
n. The task is to find the largest integer less than or equal to n such that its digits are in non-decreasing order from left to right. Which algorithmic approach guarantees an optimal solution efficiently?