BacktrackingExplained
Word Search
DFS from each cell, marking letters used.
Time
O(m · n · 4^L)
Extra space
O(L)
Use it for
Boggle-style grids.
DFS from each cell, marking letters used.
Time
O(m · n · 4^L)
Extra space
O(L)
Use it for
Boggle-style grids.