Trie
10 problems to practice.
Concatenated Words
1. You are given an array of strings containing words (without duplicates). 2. You have to return...
Implement Trie
A trie or prefix tree is a tree data structure used to efficiently store and retrieve keys in a data...
Maximum Xor Of Two Numbers In An Array
1. Given an integer array nums. 2. return the maximum result of nums[i] XOR nums[j], where 0 <=...
Design Add And Search Words Data Structure
Design a data structure that supports adding new words and finding if a string matches any previousl...
Word Search Ii
1. Given an m x n board of characters and a list of strings words, return all words present on the b...
Map Sum Pairs
Implement the MapSum class: 1. MapSum() Initializes the MapSum object. 2. void insert(String key,...
Longest Word In Dictionary
1. Given an array of strings words. 2. Find the word of longest length, where all of its substrings...
Stream Of Characters
Implement the StreamChecker class as follows: 1. StreamChecker(words): Constructor, init the data...
Count Pairs With Xor In A Range
Given an integer array nums and two integers low and high. Count number of pairs of indexes (i, j)...
Replace Words
1. You r given an array of string's say dictionary and a long string say sentence. 2. You have to r...