Ad
  • Custom User Avatar

    If the node containing the specified element has children, one of these children has to 'bubble up' and take the place the specified element was in.

    Technically, any implementation of remove is acceptable as long as it costs O(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.)

  • Custom User Avatar

    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.

  • Custom User Avatar

    All use of Test.expect should be changed to Test.assertEquals.

    And more importantly, the tests should show what it's trying to construct/test, so it's easy to see what is expected.

  • Custom User Avatar

    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.