Check if a word exists in a grid
Company: Turo
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Quick Answer: This question evaluates a candidate's skills in backtracking search, grid traversal, and managing state for constrained path-finding problems. Commonly asked to assess algorithmic problem-solving, recursion and memory-management (including in-place visited marking) within the Coding & Algorithms domain, it emphasizes practical application and understanding of time and space complexity trade-offs rather than purely theoretical concepts.
Examples
Input: ([['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']], 'ABCCED')
Expected Output: True
Explanation: Classic true.
Input: ([['A', 'B'], ['C', 'D']], 'ABCD')
Expected Output: False
Explanation: No diagonal jump.
Input: ([['A']], 'AA')
Expected Output: False
Explanation: Cannot reuse cell.
Input: ([], '')
Expected Output: True
Explanation: Empty word.