Skip to content

[Delete k digits] Possible Bug #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
OmarElgabry opened this issue Sep 27, 2015 · 0 comments
Open

[Delete k digits] Possible Bug #4

OmarElgabry opened this issue Sep 27, 2015 · 0 comments

Comments

@OmarElgabry
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant