Reputation: 11
I have two integers "X" and "Y" where X > Y, I want to find a closest larger number to Y, which is obtained by deleting zero or more digits from X, by keeping the order of digits intact.
for example: X = 4186 and Y = 11. Here by deleting 4 and 8, we left with 16, which is closest larger number to Y i.e., 11.
Can anyone help me to get the problem approach to solve?
Upvotes: 1
Views: 35