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.
guys, spoiler flag...
This comment is hidden because it contains spoiler information about the solution
You can
print(arr)
to see the input. As Voile pointed out, the array length is not fixed. The random tests include integers which have "length" of more than 4 bits.Because it doesn't. Try printing the input array and check in which cases your code doesn't work.
Not every array has
4
elements. It's your code's problem ;-)Resolving.
Edit: also clarified this bit in the descriptions and removed all input modification shenanigans.
KeyError
means accessing a structure by non-existent key. I assume that you have abinary
dict and there's simply no entry in it saved under the key4
.You can post your code, marking the comment as
spoiler
so somebody could help you with it.And please, raise an
issue
if it's a problem with the kata, your comment is aquestion
.