MAX_NUM  finding maximum possible number
Given a number n, Find out what max possible number you can make by deleting exactly k digits.
T : no of test cases <= 10^3
1 <= no of digits in n <= 10^5. (n might contain leading zeros)
0 <= k <= n
if value of n is equal to k. then just print a new line.
Input
T: no of test cases
T line follow
every line has
n , k
Output
max possible number
Example
Input:
2
1223 2
8756 2 Output: 23
87
Explanation:
Note that left to right order should be maintained. As in the example given answer is 23 not 32.
hide comments
Archangel:
20140521 16:42:09
@praveen123 I want to know that what is the way to remove k digits? Can k digits be removed from anywhere at random or k consecutive digits are to be removed?


Gaara:
20140131 14:28:25
yipee... AC on my first attempt :D


Meraj Ahmed:
20131226 20:52:33
@praveen: could you please look into my solution, I am doing it in O(n) and still getting TLE for judge 3.


BA_AK:
20131211 11:22:59
If the answer contains leaning zeros, should we print them or omit them? 

Achmet ibn Rashid:
20131025 19:05:44
AC on first try :) easy problem. 

achiever202:
20130706 16:27:31
@praveen123


darryl:
20130615 05:30:37
@Rajarshi Saha its 045. Print all numbers that are not deleted in the same order as stated. 

Rajarshi Saha:
20130605 14:25:45
@praveen123 can you tell me what should be the output for 0045 1? Shall it be 005 or 045; not clear about this. 

Ankur:
20130601 15:15:24
Finally.. AC :)


Aditya Bahuguna:
20130601 12:50:16
This gave me immense joy!!!AC

Added by:  praveen123 
Date:  20130209 
Time limit:  0.407s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  general 