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.
'This is because of the condition "if the incorrect value occurs on the leaf level, then the right child will always be the incorrect one." Since 9 + 1 != 16, the 1 must be changed to 7, rather than changing the 9 to 15.'
{19, 9, 10, 4, 5, 4, 6, 3, 2, 1, 4, 1, 3, 2, 4} answer - [3,5] incorect parents.
But!
{29, 13, 16, 5, 8, 9, 1} answer - [6.7] ! incorect leaf.
Absolutly equal case give different results?
I'm sorry, i'm not understand.
6 kyu? Really?!. ;/
The tree looks as follows:
So the error is either the 9 or the 1 and both are leaves. The description states to take the right leaf in such case.
No, you cannot suppress the default assertion message but your solution with the custom message is fine.
O_o
the picture confused me - the root is at the top and the leaves are at the bottom ...
I dont think that this kata is 6 kyu, it should be placed in minimum 5 kyu.
The check for the first character to be uppercase was a misconception and is not neccessarry.