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.
Technically, any implementation of
remove
is acceptable as long as it costsO(log(n))
in time complexity, and properly removes the element. "Bubbling up" is just one of the possible implementations.The actual test does only test for the characteristics, while the sample test forces specific implementations, but it also doesn't specify what it means by "bubble up".
(Also, this means some solutions can pass the actual tests but not the sample tests.)
Example code has missing the code for
count(aNumber)
, so some people like me didn't implemented, also add something on the description on how to implement the count method.All use of
Test.expect
should be changed toTest.assertEquals
.And more importantly, the tests should show what it's trying to construct/test, so it's easy to see what is expected.
Nice kata.
In your test cases, when you remove random numbers, you just remove one value, not ten. Check the for loop generating the values.