Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CS Games 2023 Team A Application
Full Name
Gabriel Peralta
UWindsor Email
[email protected]
Application Form
Briefly explain how your solution works and how to run it
My solution uses a depth first search (DFS) algorithm. It iterates through the array and calls a helper function that performs DFS on every letter. If the first letter of the word does not match the letter in the board, or the indexes are out of bounds, it terminates the DFS function and returns false. In the next iteration, it calls DFS on all adjacent cells and passes a word with its first letter removed. In order to know if the algorithm already traversed a letter, it swaps the letter for a number before searching the adjacent cells. Once it finishes investigating the adjacent cells, it returns the number back to its original value.
To execute this code run the following command:
Then, insert the your input as shown in the example below and press enter to receive an output.