Challenge: Word Formation From a Dictionary Using Trie

Try to 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

Examples

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