Ad
  • Custom User Avatar

    I don't think that you will get an answer here;-)... Some users like to mark their own kata(s) as "best practice" or "clever", perhaps it is one of this kind... It's always funny to see, so a little bit fun on these "serious coding site":-))...

  • Custom User Avatar

    How is this marked as best practice? This would take O(n^2). Very bad actually.

  • Custom User Avatar

    I concur. I was looking at this and noticed that it traverses the list of N items twice just to get the odd, even lists.
    Also... I don't think the parseInt map was necessary. Would that be considered another pass to the list? 3N iterations instead of N? Clever that it is only 4 lines of code.... But not very effecient for large N.