Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
but in the first test case yellow also didnt connect but yellow wins
Test.assert_equals(who_is_winner([ "C_Yellow", "E_Red", "G_Yellow", "B_Red", "D_Yellow", "B_Red", "B_Yellow", "G_Red", "C_Yellow", "C_Red", "D_Yellow", "F_Red", "E_Yellow", "A_Red", "A_Yellow", "G_Red", "A_Yellow", "F_Red", "F_Yellow", "D_Red", "B_Yellow", "E_Red", "D_Yellow", "A_Red", "G_Yellow", "D_Red", "D_Yellow", "C_Red" ]), "Yellow")
im a little confused
Hello,
How is the last test case a draw?
(who_is_winner([
"A_Red", "B_Yellow", "A_Red", "E_Yellow", "F_Red", "G_Yellow", "A_Red", "G_Yellow"
]), "Draw");
If the game ends prematurely and no player connected 4, then we assume a draw?
How big is n?
Each \n marks the end of a row.
I'm not sure what the input is.
Why does it have a bunch of \n in it?
Thank you.
Brute force fails.
You're mutating the input.
Silly me.
a,b <= n, not sum(n)
Thanks for the quick reply. :)
I think you should read the description again. Cheers.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Some Python tests are broken.
Screenshot on imgUr: https://imgur.com/a/IPqoExe
If the correct answer is on the right, it should not contain 0s where directions had to be removed.