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
ssvarma:
20180624 14:55:45
@praveen123:hi! can u pls tell me where i m lacking in my code 21889739


sameer Hussain:
20161116 12:18:47
I am getting TLE, if I use segment tree, for finding out next maximum character.


hazem_khaled8:
20150901 17:23:12
how can i avoid tle? (15041280)


CoNtRaDiCtIoN:
20150526 08:17:31
@praveen123 lots of wa can u pls provide some test cases where my solution fails or u can look into my code and tell the probable bugs... Thanks in advance :) 

Ankit:
20150425 15:27:42
Last edit: 20150426 07:53:47 

sahil hindwani:
20141220 21:12:39
submission id :13224845 why is it giving wrong answer


Sudharsansai:
20141211 19:09:07
Nice Problem!


$seraph$:
20141003 05:49:14
@praveen123: Hi! can u pls tell me where i m lacking in my code 12526342. 

SHASHANK PAL:
20140830 10:45:27
Last edit: 20140830 11:02:30 

Rishav Goyal:
20140804 13:23:51
Last edit: 20140806 07:20:27 
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 