Palindrome Pairs, solution not picking up duplicate palindrome


  • 1
    A

    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

    [[0,1],[1,0]]

    Expected answer

    [[0,1]]


  • 0
    C

    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.