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.
We really need a ping system, I only just saw this now. I asked him
but he doesn't wannamaybe?.@Kacarott, can this one be awesomised aswel?
Generally if you run into issues like that it means it's not about "optimizing" your solution but actually starting from scratch and finding a different approach that works. The correct solution to this kata solves it in a fraction of a second. Basically you need to rethink your approach. I can't say more or it would be a spoiler.
This comment is hidden because it contains spoiler information about the solution
added more helpful messages
Never mind, I get it. You're turning the whole box to the right, while the question describes a magical box that changes gravity without turning it.
Sorry for the late reply, but if you're still confused, could you please explain how you got [1, 3, 4]?
This case you asking about is in kata description. Look close at it please.
It is [1, 3, 4] if you count number of blocks per row, if you count number of blocks per column you get [1, 2, 2, 3].
In example gravity pulls from left to right, to get [1, 3, 4] you mentioned boxes have to actually go up. For me it looks like you misunderstood dimensions, this numbers are columns of blocks not rows.
bc returns correct digits when rounding properly do not match example's result.
what??
the C code has been updated, please let me know if you still have any reason for thinking there's a wrong test
After running someone else's code through the tests, the test appears to be in the wrong. Although your code takes an argument of type "char * ", for one of the fixed tests you are passed in a "const char * ". When you try writing to it, your code probably crashes - it's trying to write to read-only memory.
In my view, the test should be changed to allocate memory, copy the argument into that memory, and pass it to your code.
return true
,return false
.Loading more items...