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.
Recursive fib is a bad idea for large numbers
I made a solution using "divide and conquer" fib algorithm. In my test and in kata tests works fine. But when I try via ATTEMPT, it causes error but does not show any error, except "exit code 132"... Does anyone get ths kind of error (blank error XD)?
Hi eldesanclemente! I think you can try the "divide and conquer" fib algorithm. The recursive version takes much time for long numbers.
In the description does not says... Should I consider the numbers too? I have made all tests in Xcode and run successfully.
In the kata, it runs successfully in tests, but when I click "attempt", it shows "Index out of range".
Nice solution
I think I mixed up all here. I do not read with attention and I thought it would be an find-primes exercise. Thanks, Chrono79.
Maybe an exercise like these for further lessons would be nice, too: given an array, find an only prime between non primes, or an only non-prime between primes.
[2, 4, 0, 100, 4, 11, 2602, 36]
Should return: 11 (the only odd number) -> This is wrong, because in this array 2 and 11 are odd numbers
When I test, my code passes with flying colors. But when I use the button "ATTEMPT", the error occur:
XCTAssertEqual failed: ("0") is not equal to ("26")
I cannot figure out why it happens. Does anyone get this kind of error?