Palindrome Pairs, solution not picking up duplicate palindrome

  • 1

    My understanding of the problem is that the indexes should be distinct but not the palindromes found. In this input why isn't [1,0] part of the expected solution?

    Your input

    ["a", "a"]
    Your answer


    Expected answer


  • 0

    This is because the question requires "a list of unique words", whereas ["a", "a"] is a list of duplicate words a.

Log in to reply

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