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.
Fixed by not using string interpolation, seems the F# version here doesn't support it
Has F# been tested? I can solve the solution locally but when testing it I get this error:
/home/codewarrior/program.fsx(43,29): error FS1160: This token is reserved for future use
/home/codewarrior/program.fsx(65,76): error FS0035: This construct is deprecated: ':' is not permitted as a character in operator names and is reserved for future use
ok after looking at the other solutions I completely overthought this problem, spent a night on the red and found it particularly difficult for no reason - of course I should have just calculated the fib sequence in reverse. Sometimes a simple solution is missed
Nice simple explanation with unit testing. Good Kata, well done.
Well I spent more time trying to understand the question than coding, hacking it together piece by piece as my understanding of the question evolved. I notice a lot of problems on this site are like that. Briefer, simpler to understand questions but with complicated solutions would be a far nicer thing to encounter.
What a terribly worded Kata. "An array of numbers" is incorrect, it's an array of strings. For something like computer programming where precision is everything this is absurd.
Why are slow solutions often the #1 voted just because they contain the fewest lines of code? In terms of efficiency for the end user I'd be interested in seeing a category that solves a problem with the minimal execution time. An example of this is in C# where nearly every solution uses LINQ, which is slower than non-LINQ based solutions despite it being shorter.
Is C# working? My solution seems sounds and works on my local unit tests, but fails on the empty, 1 element, and random tests here, whilst passing SnailTest1 & SnailTest2
Why is there no sort by "execution time" in the solutions? Isn't the time/efficiency of a solution important?
I like this. the j = i + 1 is what I like. Reduces the iterations whilst not requiring an identical index check.