Solution: Word Formation From a Dictionary Using Trie

Let’s solve the Word Formation From a Dictionary Using Trie problem.

We'll cover the following

Statement

Given a dictionary, find whether a given word can be formed by combining two words from the dictionary.

Constraints:

  • 00 \leq dictionary 103\leq 10^3
  • 11 \leq dictionary[i] 102\leq 10^2
  • 11 \leq word 102\leq 10^2
  • word and words[i] consist of lowercase English letters

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.