coding-questions icon indicating copy to clipboard operation
coding-questions copied to clipboard

[Delete k digits] Possible Bug

Open OmarElgabry opened this issue 10 years ago • 0 comments

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

OmarElgabry avatar Sep 27 '15 02:09 OmarElgabry