Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Ok, my mistake, apparently stable and buggy are not the same as for most part you might not care that original indexes are different when the values copare the same (except in this kata where it ruins your solution).
Also thanks for a hint that there are quite easy ways to make this stupid sort in node.js v8 stable, with that knowledge I was able to complete it in few minutes.
So make it separate kata and add it to the kata series! Wouldn't that be nice?
I don't think that hidden task like this is part of the kata and not mention in the description.
It's one of those things thats super easy and obvious when you know it, and super confusing and frustrating when you don't.
Today I know and it was easy, yesterday I spent couple hours to figure it out and it was frustrating.
Still, please update node.js to newer version. Thanks!
Hi, for JS the issue is with limitation to Node.js v8. It has buggy Array.prototype.sort implementation (as it moves object that should stay in place). Therefore it causes random test fails.
Stable sort is available for Node.js since v12 as mendtiond in MDN resource here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
So I would suggest to update the Node.js version of this kata, otherwise, rewriting sort method for an array using any reasonable algorithm is a must for JS solution.
I agree, this seems to be more mathematical problem than programming one. There was also no mention of optimalization part of challange. I did simplest iteration based fibonacci calculation and got timeout when n was beyond 1 mil. I don't understand why there are tests with n bigger than 1 mil, the name suggest to get proper 1 mil value. I'm kinda dissappointed with this kata as I did not want to specifically search for mathematical ways of getting different equation to solve this without using the series generation.