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.
Spoiler alert: http://www.codewars.com/kata/57036f007fd72e3b77000023
public class Solution ...
should consider invalid type and value error
Should use Test.assert_equals() for the unit tests.
The appropriate thing to do is to take one of the other Fibonacci Kata and make a port, not make a new kata.
They both want the nth term of the sequence, the millionth Fibonacci is just more upfront about what n is likely to be.
Even without that one, though, there are a lot of Fibonacci kata, as shown in the search.
The millionth fibonacci kata is admittedly a bit harder than this.
Duplicate: http://www.codewars.com/kata/the-millionth-fibonacci-kata
http://www.codewars.com/kata/search?q=fibonacci
Hum... ok then. I just never saw one, and I'm pretty new to the site. Plus, I don't know much javascript, coffescript or ruby, so I don't even do kata's other then python ones. Thanks and sorry
I like how you changed x * y to y * x so you could fork XD. Yeah, it works, the few times it won't timeout. We need to change the environment variable to something like 5000 maybe
Here's why it's timingout so quickly:
ENV TIMEOUT 2000
https://github.com/Codewars/codewars-runner/blob/master/Dockerfile#L220
@jake: What should this be set to?
There's several levels of timeouts:
timeout
*nix commandFutureTask
with a set timeout, that is passed from a command line variable. By default it is 5000 msecs.https://github.com/Codewars/codewars-runner/blob/master/jvm-runner/src/clojure/codewars/kill_switch.clj
https://github.com/Codewars/codewars-runner/blob/master/jvm-runner/src/clojure/codewars/core.clj#L26
Somehow the JVM timeout is being hit here, and somehow its set to 2000... I assume in some environment variable in the docker container
<:LF:>
is a special formatting token that we came up with. Since we treat each line of STDOUT as its own "data item", if there is ever a single data item (such as an error message) that has multiple lines, we replace those lines with <:LF:> as a substitute. Those tokens are then later on translated back into new lines by our formatter code. Its the same formatter code for all languages, so its interesting that it makes it all the way to the UI, but only for Java.The custom junit formatter might be html escaping the <:LF:> tag. I've added a Github issue.
Forgot to remove the imports :P
Anyway, I wonder what the problem is. So, if the runner times out at 10.000ms than that is definively not the reason....
To be honest I'm clueless.
Btw, what is the <:LF:>?
I've been looking all over and can't find it's meaning
There is already a kata for this. (in fact there is multiple kata for the famous fibonacci sequence).
Loading more items...