Ad
  • Custom User Avatar

    In C variant I was still getting even-length arrays, so I decided to handle that and compute median as it should be computed -- mean of 2 middle elements.
    So I spent few hours after that trying to figure out error, then I decided to handle even-length arrays as odd-length, and all tests passed.
    You should either fix description and tests, or just fix tests to generate only odd-length arrays.
    The most simple thing you should do is add while loop in int getRandomInteger(int lowerBoundInclusive, int upperBoundExclusive), checking for even value.

    P.S. Didn't mark this as spoiler since kata for C is broken and people can actually spend quite a lot time figuring out problem that doesn't exist.