Google | Onsite | Word from the board

The following question was asked to me during my recent google onsite round 1.

Given a DxD board which contains charaters on each cell, find the number of times the given word occurs on the board.
Constraints :

  • user can move up, down, left and right withing the board boundaries
  • if given word is palindrome, then reverse of the found word will be considered as a new word found

Solution Approach: I could suggest the solution with the backtrack approach

Waiting for the R1 results.

Comments (3)