algorithms.tutorialhorizon.com

Smallest Number after Removing K digits | Algorithms

Objective: Given a number with N digits, write a program to get the smallest number possible after removing k digits from number N. OR Implement a method that returns the lowest possible number that could be generated after removing n characters from a string of digits. Example: N = 1453287, k = 3 Output: 1287