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.
OP solved it, closing
OP solved it, closing
oh, thank you so much, sorry for the stupid error
Not a kata issue, you use a var with the same name as the function. Use
let
to keep the scope (and probably it's not a best practice to name two different things the same).This comment is hidden because it contains spoiler information about the solution
clever
Yes, you run out of cards, you lose. The winner is the player that ends up with all the cards.
nice kata! maybe too easy for 4 kyu, but still enjoyed resolving it, and very useful to train about oop
sorry for the stupid question, but what if a player ran out of cards in his hand? does he lose immediately? I think I don't understand...
for the rest of the test cases did you TLE? because seems like the parts that go "array[a][b] not in res" is going to be O(n-squared) time complexity due to searching through the whole array every time you try to put something in.
if its TLE, try to think of a faster algo?
Good first step is to reproduce failing test cases locally and debug them in your IDE: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#how-can-i-see-which-input-causes-my-solution-to-fail
sorry if i ask to you, but i updated a bit the code, and on my own it works, i think there are some strange cases that i can' handle, but i tried all the sample test and they work fine, can you give me an hint? :)
the shape isn't the only problem. I guess you should read a bit more about sudokus. Maybe solve some by hand too.
not an issue a question (since the problem is in your code, not in the kata)
I'd bet on global variables in your code, that are interacting from one test to the other.
Some readings](https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution)
Post your code with a spoiler flag if needed.
Closing the issue aspect,
Cheers
hi, when i try the code on my pc it works fine, but when i run it on codewars, it always return an
IndexError
:IndexError: too many indices for array
, i can't figure out why. can someone help me?this is my code:
Loading more items...