Given a 2-d maze of characters, find if there exists a word "Algorithms" in the maze. By exists we mean it exists in a row, a column or like snakes (diagonals prohibited though)?
By snakes, we mean like following
A . . . M S
L G . T H .
. O R I . .
Use DFS and explore the maze as and when letters are found
1 year ago
No comments:
Post a Comment