Determine Whether a Word Exists in a Character Grid
Company: Uber
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: hard
Interview Round: Technical Screen
Quick Answer: Practice a Uber coding interview problem focused on determine whether a word exists in a character grid. The prompt emphasizes edge cases, clean implementation, and verifiable test behavior without revealing the solution.
Examples
Input: {"board":[["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]],"word":"ABCCED"}
Expected Output: true
Explanation: Exists.
Input: {"board":[["A","B"],["C","D"]],"word":"ABCD"}
Expected Output: false
Explanation: Cannot jump.
Input: {"board":[["A"]],"word":"A"}
Expected Output: true
Explanation: Single.
Input: {"board":[["A"]],"word":"B"}
Expected Output: false
Explanation: Mismatch.
Input: {"board":[["A","A"]],"word":"AAA"}
Expected Output: false
Explanation: Cannot reuse.
Input: {"board":[["A","B"],["D","C"]],"word":"ABCD"}
Expected Output: true
Explanation: Path around square.
Input: {"board":[],"word":"A"}
Expected Output: false
Explanation: Empty board.
Input: {"board":[["A"]],"word":""}
Expected Output: true
Explanation: Empty word.