Skip to content

Conversation

@NorikaU
Copy link

@NorikaU NorikaU commented Dec 4, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant