Skip to content

Update 1275 Find Winner on a Tic Tac Toe Game - Change break to continue #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

amavor
Copy link
Contributor

@amavor amavor commented Apr 21, 2024

Tic Tac Toe solution used break inside a loop when the first cell of the column or row was empty. I believe this will result in it skipping all other rows/columns when it reaches a null cell. Instead of using break I think it should be continue instead.

Tested locally and continue works for 3 vertical in the last column, where break fails to find the winner.

Tic Tac Toe solution used `break` inside a loop when the first cell of the column or row was empty. I believe this will result in it skipping all other rows/columns when it reaches a null cell. Instead of using `break` I think it should be `continue` instead.

Tested locally and `continue` works for 3 vertical in the last column, where `break` fails to find the winner.
@javadev
Copy link
Contributor

javadev commented Apr 22, 2024

Thanks for the pull request. I'll merge it.

@javadev javadev merged commit 965c4b2 into LeetCode-in-Kotlin:main Apr 22, 2024
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.

2 participants