I want to konw why?


  • -1
    S

    Submission Result: Wrong Answer

    Input: "wlrbbmqbhcdarzowkkyhiddqscdxrjmowfrxsjybldbefsarcbynecdyggxxpklorellnmpapqfwkhopkmco"
    Output: 23
    Expected: 12

    I think it contains 23 characters why expetected is 12?!


  • 0
    I

    why do you think it contains 23? can you grep it out?


  • 3
    M

    mqbh cdar zowk

    mowf rxsj ybld

    There are two occurrences of 12 characters without a repeated character. I've given them above. However, there is no string that is longer than that without repeating. If you provide what you think is the 23 length substring, you will see there is a repeat in it somewhere.

    If you only think it is 23 because that is what your program told you, I suggest taking this offline and running it against this input, but also printing the substring it thinks beats the previous length. This way, you will get a list of the longest substrings and can see where it is going wrong.


Log in to reply
 

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