Word Search II
A hard-tier problem at 37% community acceptance, tagged with Array, String, Backtracking. Reported in interviews at Two Sigma and 20 others.
Word Search II is the hard version that separates candidates who understand Trie-based optimization from those who brute-force and timeout. You're given a 2D board and a list of words to find, and the naive approach of running a search for each word independently will fail on large inputs. Two Sigma, Airbnb, and Snowflake ask this frequently. The trick is to build a Trie of all target words upfront, then do a single backtracking pass through the matrix, pruning aggressively as you traverse the Trie. This is the kind of problem where the right data structure choice means the difference between passing and getting rejected. If you blank on the Trie pattern during the live assessment and hit a wall, StealthCoder surfaces the working solution in seconds, invisible to the proctor.
Companies that ask "Word Search II"
Word Search II is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built by an engineer who got tired of watching his cohort grind for six months and still get filtered at the OA stage.
Get StealthCoderThe core challenge is efficiency. A naive approach tries every word separately, making multiple full-matrix traversals. The winning pattern is to invert the search: build a Trie from the word list, then use backtracking on the board with the Trie as a guide. At each cell, you explore only paths that match Trie prefixes, pruning dead branches before they blow up the recursion tree. You'll need to mark visited cells to avoid cycles, carefully unmark them on backtrack, and remove completed words from the Trie to avoid duplicates. The real pitfall is forgetting to unmark cells during backtrack or mishandling the Trie state. This combines Array, String, Backtracking, Trie, and Matrix skills in one tight package. If you freeze on the Trie setup or the backtrack logic during your OA, StealthCoder removes the guesswork and delivers a solution in real time.
Pattern tags
You know the problem.
Make sure you actually pass it.
Word Search II recycles across companies for a reason. It's hard-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built by an engineer who got tired of watching his cohort grind for six months and still get filtered at the OA stage. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Word Search II interview FAQ
Is Word Search II still asked by top companies?+
Yes. It shows up across at least 10 major companies including Two Sigma, Airbnb, Snowflake, and Cisco. The hard difficulty and acceptance rate below 38% reflect its real teeth. It's a classic technical screen question because it tests data structure intuition and recursion discipline simultaneously.
What's the trick I'm missing if I timeout?+
You're probably running separate backtracking searches for each word. The trick is to build one Trie upfront and do a single board traversal, using the Trie to prune invalid paths. Trie-guided search is orders of magnitude faster than word-by-word iteration on large inputs.
How does the Trie connect to the backtracking part?+
The Trie acts as a live filter. As you backtrack through the board, you move down the Trie in parallel. If the current character doesn't match any Trie edge, you stop exploring that path immediately. This pruning prevents exponential blowup and keeps the recursion tree manageable.
What's the hardest part to get right?+
Unmarking visited cells during backtrack. Candidates often forget to restore the board state, causing false negatives or duplicates. Also tricky: removing found words from the Trie to avoid returning duplicates. Get backtrack discipline right and the solution clicks.
Is this really harder than Word Search I?+
Much harder. Word Search I finds one word and takes seconds. Word Search II requires finding multiple words efficiently under time pressure, forces you to pick the right data structure, and has a 37% acceptance rate versus higher rates for part one. The gap is real.
Want the actual problem statement? View "Word Search II" on LeetCode →