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
PLEASE FILL IN THE FOLLOWING!
Full Name
Norika Upadhyay
UWindsor Email
[email protected]
Application Form
Briefly explain how your solution works and how to run it
My solution is a function that takes in a 2D array of letters (board) and a string (word) and checks whether the string can be made using adjacent cells of the array by using depth first search. It starts by looking for the first letter of the word in the array, then checking if the next letter is in the adjacent cells in four directions. It keeps repeating this process until either the end of the string, in which case it returns True, or until the next letter cannot be found, in which case it returns False.
Run it on Python using function exist(board, word) where board is a 2D array of strings and word is a string.