📄️ Guidelines
Trie are probably one of the most straighforward patterns to spot since your first hint when working with strings, suffix, prefix should be to use trie data structure. Below we list implementation of basic implementation for trie.
📄️ Implement Trie (Prefix Tree)
A trie (pronounced as try) or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings. There are various applications of this data structure, such as autocomplete and spellchecker.
📄️ Design Add and Search Words Data Structure
Design a data structure that supports adding new words and finding if a string matches any previously added string.
📄️ Longest Word in Dictionary
Given an array of strings words representing an English Dictionary, return the longest word in words that can be built one character at a time by other words in words.
📄️ Maximum XOR of Two Numbers in an Array
Given an integer array nums, return the maximum result of nums[i] XOR nums[j], where 0 <= i <= j < n.
📄️ Concatenated Words
Given an array of strings words (without duplicates), return all the concatenated words in the given list of words.
📄️ Word Search II
Given an m x n board of characters and a list of strings words, return all words on the board.
📄️ Prefix and Suffix Search
Design a special dictionary that searches the words in it by a prefix and a suffix.
📄️ Palindrome Pairs
You are given a 0-indexed array of unique strings words. A palindrome pair is a pair of integers (i, j) such that: