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.
Reading the description, it is fine for the Ruby version it was originally written for over a decade ago. On the one hand, I'd somewhat agree with the other language versions stating to capitalize the first letter, but any clarification needed is given in the examples of given input and expected output.
This error happens when, for example, you try to
parseInt
a string that's too long and wouldn't fit the datatype. You should find more info where the error came from if you follow the stack trace.Language is not relevant here. It's implementation problem.
No, you didn't (or at least, no with your current java code), if you have an empty array and n = 4, your code tries to return a 4 (currently 5) elements array, not an empty one. Also note this error:
You're doing something wrong there.
Well, you just got to apply some logic, and there are also fixed tests that show you expected result.
What's the result of taking 0 items of any array? What's the result of taking 100 items of an empty array? In both cases it's just an empty array.
Well, I agree that the " be ready for anything else which is not clearly specified" is really poor style and should not be there, but come on, if the caller requests two elements, then how can be interpreted differently than, duh, returning two elements?
I don;t think it's true. Signature length does not directly affect what are the first two elements of the sequence.
You'll have to flush your print to see it in that case:
You're in this case: https://docs.codewars.com/training/troubleshooting#no-print
Read the conditions again and fix your code. It's timing out because it doesn't pass some edge cases.
How is this not an array?
what rounding? 1.2 x 50 is exactly 60, add 6 and you get 66...
It is not meant to. Figuring out how to put three sticks together to form a triangle is a part of the exercise.
Seriously, while ranting, you need to explain a bit better what you consider a problem because from all the complaints until now, all I've seen is you saying "this is wrong" about somethign what does not really appear wrong at the first sight. Call me stupid, but how is
1,2,9 -> false
misleading? You cannot have a triangle with sides of 1, 2, and 9, so the expected answer isfalse
. What exactly is wrong with it?