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.
me too,
In the comparison [] != 0, the left hand side is converted to a number first. When converting to a number, [] and [0] both become 0, [1] becomes 1, [2] becomes 2 etc. So [] != 0 becomes 0 != 0 which is false.
Can someone explain this?
=== mean an exact match --> (0 == "0") = true
== means a less exact match --> (0 === "0") = false
^right?
If so, [] != 0 would be mean that the array is empty loosely but [] !== 0 is certainly empty? What's the distinction here? In the above, at least, you can see how 0 =="0" is true since "0" as an integer is is equal to 0 but what's the logic for the array being empty with two vs. three equal signs?
[] == [] //false
[] == ![] //true
RM84's solution is much more intuitive. Isn't it?
This comment is hidden because it contains spoiler information about the solution
There are currently 47 working python solutions.
I don't understand. please somebody describe.
This isn't the equation for factorial ; this equation is:
This is called an arithmetic progression: http://en.wikipedia.org/wiki/Arithmetic_progression