Given a list of unique words, find all pairs of distinct indices (i, j) such that words[i] + words[j] is a palindrome. Brute force over all pairs is too slow; a trie was expected.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.