Challenge: Word Formation Using a Hash Table

Try to solve the Word Formation Using a Hash Table problem.

We'll cover the following

Statement

Given an array of words wordsArray, determine whether a given target can be formed by combining two words from the array in any order.

Constraints:

  • 2 \leq wordsArray.length 103\leq 10^3

  • 1 \leq wordsArray[i].length 20\leq 20

  • 2 \leq target.length 40\leq 40

  • All words consist of lowercase English letters

Examples

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