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
Store all words in trie. During search, DFS tracks whether one mismatch has already been used.
The dictionary path must match exactly except one allowed mismatch. DFS explores all characters and only succeeds when length ends with exactly one change.
Updated Feb 2026