Ad
  • Custom User Avatar

    Exactly. In my case I knew the sort function of array, but thought it would be more useful to me to try and write the good old bubble sort, which I haven't used for years. Then I realized I forgot about the many sorting techniques I've learnt in college. I guess this is the purpose of katas; to improve your skills and to get the rust off of you.

  • Custom User Avatar

    @blesh: Many of these katas don't make any sense. These are just exercises to improve your skills, learn language features you didn't know before or try out different ways to solve a problem.

  • Custom User Avatar

    I saw one comment where somebody discovered the "sort"-function of JavaScript - at least for this person I think the Kata fulfilled its purpose!

    With regard to changing the input-array, there was some discussion about whether this is good practice or not. There has been no conclusion, as far as I remember.

  • Custom User Avatar

    I don't think so. Sorting the existing array and returning that fulfills the requirement "output a sorted array". There is no requirement given, that says, that the original array must not be changed.