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.
There is a solution in O(1).
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The joys of debugging :-)
If you can provide more details, maybe we are able to help you. What is the compiler complaining about?
The kata is actually quite good, maybe we can help you understand the task?
The goal is to find the "odd one out", if you pardon the pun. You have an array of numbers, almost all of them divisible by 2 (even) or not divisible by 2 (odd), except for one "black sheep". The purpose is to find that number that is not like the others.
The task is not about positive or negative integers at all, but rather about odd and even integers. Negative integers can be as divisible by 2 as positive ones.