False negative? (solved)


  • 0
    K

    I got the following test case failed but it looks fine.

    Input:
    "aaaaaxaaaaa"
    ["bbbbbxbbbbb"]
    Output:
    "9a1"
    Expected:
    "10a"

    Choosing the lexicographically smallest one would pass the tests.


  • 0

    That's my test case, you're welcome :-)

    "9a1" is wrong because it's longer than "10a". Remember that "10a" has length 2.


  • 0
    K

    Oh, you are right. Okay, I see now. Thanks.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.