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.
My array's values keeps getting reset right after being manipulated in the subtract function in one of the Attempt Tests, while it works just fine with the Sample Tests.
I am not sure what kind of "memory handling" or "memory optimization" you need to do, because it is definitely not the intention here. I checked a bunch of C# solutions, including mine old solution, and out of 10 solutions tested by me, all of them run in 3-3.5 seconds.
We can use this as a starting point to make some conclusions :)
C# 12
I don't know if I'm doing something very wierdly but the original test passes brilliantly but when trying to "attempt" it times out.
Is the point of this to do memory handling or to make an interpreter? Because as it stands I've had to spend more time on learning memory optimization :/
Unsure whether this is a CodeWars limitation and this Kata is simply too complex for CodeWars or if I'm just really dumb T_T
Will be good to mention in description, that random movement change(?) has to be distributed 50\50 (+-5%) between directions.
This kata would've been a lot better, and a bit tougher, if draws also counted games that had empty spaces but were unwinnable.
The possibility of a jagged matrix (i. e. lines of variable length) defeat the concept of "instructions scattered over a ‹two-dimensional plane›". It would only make sense to receive the input as a 2D matrix (i. e. a list of lists of fixed length).
not as simple as i thought
Thank you for your answer.
Yes, it was my fault.
I need to be attentive to details.
It's
expected your answer to equal expected answer
, so the expected value in the error message is 1 not -1. -1 is the value your function returned. Not a kata issue.[[1,1,1],[0,2,2],[0,0,0]]: expected -1 to equal 1.
The test expects -1, although the correct answer is 1.
Might just be me but I didn't think it was very clear that the input could have variable length rows & columns, and that the expected behaviour of "wrapping around" would be from e.g. index 8,10 to 7,6 when moving up if 7,6 is the furthest out index in that row. Could perhaps be made more explicit that this is the case.
lack of random testing
so once i removed the prints everything worked fine:P
This comment is hidden because it contains spoiler information about the solution
would it not also be a cat's game(no win con) before all tiles has been filled?
eg: [[1, 2, 2], [2, 1, 1], [0, 0, 2]]
Loading more items...