Grid Search

Solve a hard-level problem for searching multiple words in a grid using tries.

Problem statement

Given a grid of characters and a list of strings words, return all the words present in the grid. While searching the grid, you can move to adjacent cells in four directions: up, down, left, and right. The same cell cannot be used more than once in the same word.

Example 1

Sample input

Get hands-on with 1400+ tech skills courses.