You are given a non-negative integer ‘num’ in the form of a string and provided with an integer ‘k’.
You need to find the smallest integer possible by removing exactly ‘k’ digits from ‘num.’
Note :
‘num’ does not have leading zeros except when ‘num’ equals zero.
Example:
Input: ‘num’ = ‘141’ , ‘k’ = 1.
Output: ‘11’
Explanation: By removing only 1 digit from ‘num’, 3 numbers can be formed: 14, 11, and 41. Out of which 11 is the smallest number.
Note :
You don’t have to print anything. It has already been taken care of. Just implement the given function.
Input Format :
The first line of the input contains the string 'num'.
The second line contains the integer 'k'.
Output Format :
For each test case, return a string, the minimum integer that can be made by removing ‘k’ digits from ‘num’.