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.
The problem description states "You cannot assume the size of the array". This solution will attempt to write past the end of the allocated memory if the words and added spaces exceed 1000 characters.
The problem description states "You cannot assume the size of the array". This solution will attempt to write past the end of the allocated memory if the words and added spaces exceed 100 characters.
The problem description states "You cannot assume the size of the array". This solution will attempt to write past the end of the allocated memory if the words and added spaces exceed 512 characters.
The problem description states "You cannot assume the size of the array". This solution will attempt to write past the end of the allocated memory if the words and added spaces exceed 256 characters.
The problem description stated "You cannot assume the size of the array". This solution will crash if the words and added spaces exceed 1000 characters.
Your code differs from the solutions in a small, but significant way. You'll kick yourself when you see it.
Even better would be to test that each color occurs with roughly even frequency. Otherwise, solutions that can return any color, but that favor certain colors, will pass.
I'm pretty sure some of your test cases want me to say a newly created ticket is invalid even though it matches correctCode.
Nope. Looks good.
Fixed the bracket. Thanks.
I switched to Test.assertSimilar() as you suggested. Thanks.
Ouch. Thanks for the heads up. I thought it was ok to use since the kata editor didn't complain. Fixed now.
This is exactly what we would expect if bitwise operands are treated as signed 32 bit integers, since the >> operator will sign extend its operands.
To avoid sign extension, we need the >>> operator.
Good point. In the description, maybe
could be changed to something like
Your description states
but it seems that none of your test cases omit the count. Additionally, it seems you expect us to treat a count of "null" as if the count were omitted, but "null" and omitted are not the same.
Loading more items...