Ad
  • Custom User Avatar

    It's not O(n^2) ya doofus. It's O(n * k), where n is number of splits, and k is the select (or vice versa). It's still very time complex, but it doesn't grow by the number of splits squared.

  • Custom User Avatar

    It's just named "sorted", not that it's sorted

  • Custom User Avatar

    Please use spoiler flag next time, your post was visible in the homepage.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    As I understand it, it's just how BitConverter works. It seems that whatever architecture CodeWars uses to run our code happens to be little-endian, and thus GetBytes() acts accordingly. See the documentation:

    The order of bytes in the array returned by the GetBytes method depends on whether the computer architecture is little-endian or big-endian.

    Do note that the Kata does implicitly describe the first octet being the left-most one (and, correspondingly, the most significant one).