Coding

Search for a Word in a 2D Board

Search for a word in a 2D board of characters.

Input: board = [["C","A","A"],["A","A","A"],["B","C","D"]], word = "AAB"

Output: TRUE

Explanation: DFS traverses adjacent matching letters perfectly, finding "AAB" without improperly revisiting any cells.

Was asked at

Practice this question with AI

First session is free - no credit card required.

Go Premium

More interviews, more skills, more success.

Practice More Questions

Interview question asked to Software Engineers interviewing at athenahealth, Dunzo, BCE and other companies. Original question asked: Search for a Word in a 2D Board.