Skip to content

[Delete k digits] Possible Bug #4

@OmarElgabry

Description

@OmarElgabry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions