coding-questions
coding-questions copied to clipboard
[Delete k digits] Possible Bug
Hello!,
I tried to use the code for deleting k digits but it seems it fails in some test cases.
Given num = 891, k =1.
Output 89
I think the correct solution is 81 instead. I've a similar code to get the min/max number by removing k digits, this will return the correct solution.
Please let me know if i'm missing something here.
Thanks