Algorithm · Bloomberg · Medium
Requirements You are given a 2-D lowercase-character grid board[m][n] along with a string word. Return true when the characters of word can be traced through orthogonally adjacent cells—up, down, left, or right—without using any grid position more than once. Return false when no such route exists. Function signature: Frequently explored follow-ups: Explain why DFS is a better fit than BFS here. Analyze the running time: Extend the approach to search for many words…
Checking your access…