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.
OP solved it, closing
Exactly like my solution.
Probably truth is in the middle.
Knowing how to implement something without built-in functions is important from one hand, but from other hand is crucial for professional programming to know language library for fast-usage of such "ready-made" functions.
This comment is hidden because it contains spoiler information about the solution
I don't think so. It teaches you how not to invent the wheel by utilizing existing functions.
I really like this solution because it doesn't use the math module and it still remains simple.
so get the thing, in this case an array at the ith index, and then since we know it is an array, just get the 0th index
in other words to match our example
I realize this is a year later but i figured i could still answer.
finally! a piece of code i can understand!
I like this sollution
This comment is hidden because it contains spoiler information about the solution
I thought so too, but notice if the number is < 2, it'll only iterate twice before it reaches that statement.
i like it solution :)
Hu, though there was effectively a problem: the random generator could create negative numbers. I fixed that (this does not happen in the other languages).
you're right i did not htink about it
Well, my dear... Your code is actually wrong. Because of this:
EDIT: well, actually no, it's just totally wrong, in fact. It seems it passes the tests only by chance. Now that you can see the other answers, you'll be able to figure it out.
Loading more items...