Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Insert all dictionary words in trie, then DFS the board; prune branches when next character is absent in trie.
Trie prunes non-prefix paths early, preventing exponential growth from branches that can never form a valid word.
Updated Feb 2026