Is this a wrong test case?


  • 1
    L

    I think "more than once" mean twice or above. overlapped occurrence should not be considered.

    Input:
    "AAAAAAAAAAA"

    Output:
    []

    Expected:
    ["AAAAAAAAAA"]


  • 1

    overlapped occurrence should not be considered

    Obviously the problem setter disagrees.


  • 0
    L

    I'm confused too.
    If overlapping is allowed, the example given in the question
    "AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT",
    should have expected return including "AAAACCCCCA", "AAACCCCCAA" ... as well
    , rather than only two substrings["AAAAACCCCC", "CCCCCAAAAA"].

    ----------------------------------------------------------edited--------------------------------------------------

    I miscounted the 'C's, there are 5 and 6 'C's, overlapping is allowed, no problem


Log in to reply
 

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