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.
Shit.
It's also dumb, I updated the tests so you can't do this stupid thing.
Well, Codewars doesn't run ES6, it's backed by node.js
Anyway, even still, the recursion used in this isn't in the tail position, so even if the JS interpreter had TCO, it wouldn't do anything in this.
Unless you know what you're doing with tail calls, the best practice is always: don't use recursion.
Best practice in javascript is to not use recursion, since it makes javascript sad.
On behalf of callstacks everywhere, thank you for not using recursion!
http://www.codewars.com/kata/n-th-fibonacci
The exercise above is just a simple Fibonacci calculation. It's a 6kyu because it was made quite a while ago, and difficulties have shifted over time.
There are too many Fibonacci kata, this one does not add anything.
There are already plenty of similar exercises to this on this website, we do not really need any more Fibonacci exercises, do we?
Thanks! Nice solution... you could dodge the java interop with
.indexOf
if you usedkeep-indexed
Looking at your attempted solution, you are going to need a faster algorithm. Did you check out the hint?
This isn't about Cantor's diagonal argument, it's about the inverse of the Cantor pairing function.
http://en.wikipedia.org/wiki/Pairing_function#Inverting_the_Cantor_pairing_function
You should probably change the title.
This comment is hidden because it contains spoiler information about the solution
There was already a community vote on this, lots of people fealt this was a 3 kyu.
Yeah, but I want it to behave just like this:
I don't want it to be deletable.
Loading more items...