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.
You are missing something, but we cannot tell you what you are missing without seeing your code.
This comment is hidden because it contains spoiler information about the solution
closing, as this would be a
suggestion
anyways, not anissue
. there are ways to properly free all of the memory in a standard-compliant way, and without using global variables.assertion messages for the PHP random tests are completely unhelpful:
Failed asserting that false is true
your solution is wrong, for example for
observed = "00001"
, it will return an array likearray(48) { "88818", "08818", "80818", "00818", ... }
--> the1
is treated as if it was in the 4th position, while it is in the 5th position in the input. though it is true that assertion messages are horrendous in PHP, i will raise an issue about that.the error comes from your code: wrong index calculation, so you access invalid memory
should be:
(you forgot the + 1 for the nul terminator, and you got the pointer arithmetic wrong:
ptr + n
will addn * sizeof *ptr
toptr
, so you were going out-of-bounds ofpins
. The cast tochar *
needs to happen right away, in order to have byte-level memory access.)This comment is hidden because it contains spoiler information about the solution
Really sorry, I didn't know that I had tried to attempt this kata a long period back.
That code was mine actually :/
My bad!
Thanks for the reply!
The initial solution in python does not have any function body for
__init__
, I'm not sure where you're getting that from.That said, you should never raise a
BaseException
. The exact exception type doesn't matter for this kata, but it should be a concrete type, not the base class. Tryraise ValueError(...)
, it will fix your issue.Hi!
The author has given the following code in the object constructor in the Python Solution's preloaded code:
Now my solution works for all the fixed tests, however Test 7 Exception Calls is just not passing :c
I'm handling the rollback error as well
But it's stopping at the error I've just written above in the code.
What could be the issue?
P.S. I'm getting this error:
I'd appreciate your help!
This comment is hidden because it contains spoiler information about the solution
It was nice practicing my recursion skills after long C:
Nice kata!
Nice kata! I'm getting started with recursions and this kata was a good experience practicing that + the concept of generators in Python :)
Gotta say calculating the transmission rate was the toughest part of the problem for me!
Nice kata!!
Thanks for sparing your time for letting know your thoughts!
I shall be definitely focusing on all the points you had mentioned from the next turn!
Thanks again!
Loading more items...