Reported February 2026
Bloombergbacktracking

Word Search

Reported by candidates from Bloomberg's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Bloomberg OA. Under 2s to a working solution.
Founder's read

Bloomberg reported this Word Search question in February 2026, and the grid is tiny: 6 by 6 at most, with a word up to 15 letters. That size is the tell. Brute force over every start cell with a DFS is fine here, so don't hunt for something clever. The hinted pattern says binary-search, but nothing in the problem sorts or halves anything. This is backtracking on a matrix. If you blank during the live OA, StealthCoder sits invisibly on your screen and gives you the solution, but the template below is short enough to carry in your head.

The problem

Given a rectangular character grid board and a string word, return true if word can be formed by a path through the grid. Otherwise, return false.
A path may move horizontally or vertically between adjacent cells. The same grid cell cannot be used more than once in one path.

Function
wordExists(board: char[][], word: String) → boolean

Examples
Example 1
board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]]
word = "ABCCED"
return = true
The path uses the top-row cells A, B, and C, then continues down to C, left to E, and left to D.
Example 2
board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]]
word = "ABCB"
return = false
The only adjacent B that could finish the word is the cell already used after the starting A, and a cell cannot be reused.
Example 3
board = [["A"]]
word = "A"
return = true
The single grid cell forms the complete word.

Constraints
1 <= board.length <= 6
1 <= board[i].length <= 6
Every row of board has the same length.
1 <= word.length <= 15
board and word contain only uppercase and lowercase English letters.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The trick is DFS with backtracking from every cell that matches word[0]. At each step, check bounds, check the cell equals word[index], mark it used, recurse in four directions, then unmark it. Return true the moment index hits word.length. The common pitfall is forgetting to restore the cell after recursion, which poisons later paths. Another is using a separate visited matrix and allocating it on every call, which is wasteful but still passes at these sizes. A cheap early exit: count letters in the board and bail if the word needs more of a letter than exists. Complexity is roughly cells times 3 to the power of word length, which is fine at 36 cells and 15 letters. If the recursion shape slips away mid-assessment, StealthCoder is the hedge that hands you a working version while you keep typing.

If this hits your live OA and you blank, StealthCoder solves it in seconds, invisible to the proctor.

If this hits your live OA

You can drill Word Search cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it.

Get StealthCoder

Related leaked OAs

⏵ Practice the LeetCode equivalent

This OA pattern shows up on LeetCode as word search. If you have time before the OA, drill that.

⏵ The honest play

You've seen the question. Make sure you actually pass Bloomberg's OA.

Bloomberg reuses patterns across OAs. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Word Search FAQ

What's the trick to Word Search?+

DFS with backtracking. Start from every cell matching the first letter, mark the current cell as used, try four neighbors for the next letter, then unmark on the way back. Unmarking is the step people forget, and it causes wrong answers on examples like ABCB.

Is this really a binary search problem?+

No. The hinted tag doesn't fit. Nothing is sorted and nothing gets halved. The real pattern is backtracking and DFS on a matrix. Ignore the binary-search label and write recursive grid traversal.

Will brute force time out?+

Not with these limits. The board is at most 6 by 6 and the word is at most 15 characters. Each step branches to at most 3 new directions after the first, so plain backtracking fits. Add a letter-frequency precheck if you want a cheap speedup.

How do I mark cells as visited without extra memory?+

Temporarily overwrite the cell with a sentinel like '#' before recursing, then restore the original character after. That avoids a visited matrix and makes the undo step explicit. Just make sure you restore it on every return path, including successes.

How do I prepare for this in 48 hours?+

Write the DFS backtracking template from memory three times on a small grid. Trace Example 2 by hand to see why reuse fails. Then test edge cases: a 1 by 1 board, a word longer than the cell count, and repeated letters. That's enough for this one.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Bloomberg.

OA at Bloomberg?
Invisible during screen share
Get it