Ad
  • Custom User Avatar

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

  • Custom User Avatar

    if the author came from haskel that's the natural way of using functions...

  • Custom User Avatar

    This solution has a run time of O(n). Since the run time of a sorting algorithm is usually O(nlogn), and you'd still have to iterate through your array once more to count the number of times the integer appears, this solution would be faster.

  • Custom User Avatar

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

  • Custom User Avatar

    They were ranked ages ago when the ranking system was based on the task at hand instead of how fast someone solved the kata, now the standard has dropped dramtically because multiple people can approve katas instead of the one person like before.

  • Custom User Avatar

    Never thought about doing it backwards, to be honest. Clever!

    Unfortunately, I can't add more test cases after the kata has been published. (Wish I could, it was published before all the languages had been properly filled with tests cases.)

    Thanks for pointing it out.

    Now I will spend the day trying to come up with a real sentence that will catch this kind of code in both directions. :-)