Feature #1: Search for a Single Word in the Boggle Grid

Implement the "Search for a Single Word in the Boggle Grid" feature for our "Boggle" project.

Description

For this project’s first feature, you are given a grid of letters, representing the Boggle grid, and a word to search inside that grid. The input is twenty-five alphabets arranged in a 5x5 grid. In this variation of the Boggle game, there are the following rules:

  • Words can be constructed from the letters in sequentially adjacent cells.
  • These adjacent cells can be horizontal or vertical neighbors only. Diagonally opposite dice are not considered adjacent.
  • A cell can only be part of one word.

Take a look at the following illustration to better understand how to find words in the Boggle grid:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.