Don't understand a test case


  • 1
    7

    "bbabcaccaaabababbaaaaccbbcbacbacacccbbcaabcbcacaaccbabbbbbcacccaccbab"
    0
    Could someone explain how this answer can make sense ?
    Expected:
    "abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc"


  • 0
    M

    @70664914 The question is to ask to re-arrange the string, when to make sure the repeated character's distance is at least k. Here the k is zero. As a result, no need to re-arrange, and it must satisfy the requirement -- just return the input str.


Log in to reply
 

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