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.
?? LOL
Doesn't work. Fatal flaw. Otherwise good solution.
This comment is hidden because it contains spoiler information about the solution
Will fail if array[0] == array[1] and the array is sorted ascending (array[i]<=array[i+1]).
Otherwise good solution.
Sounds like you're declaring a variable but never assigning it a value before you are trying to read its value.
int i; // i is not initialized (but declared)
j = i + 1; // error
int i = 0; // i is initialized and declared
j = i + 1; // j = 1