This comment is hidden because it contains spoiler information about the solution
(1 / n!) * (1! + 2! + 3! + ... + n!)
= (1 / n!) * n!+(1 / n!) * (n-1)!+(1 / n!) * (n-2)!+.....+(1 / n!) * 1
This is a right bit shift.
Concretely, x >> n is the same as x / (2^n).
So, x >> 1 is just x / 2, but it's faster than the division.
Hello there. What does the >> mean? Is it like a true/false value?
can you explain what the regex means for this one
Can someone explain me, what happen here?) I am not good at math.
Very clever, well done.
I wholeheartedly agree.
I don't think it's equivalent. The trailing spaces could be part of a string. In that case, having trailing spaces or not does matter.
Sorry but this is not clever at all. Unless you're trying to find the most expensive algorithm to get the result...
In fact, I think I've also been the only one to implement it purely functionnally (using only recursion and no mutation).
Maybe you should add that to the description, phantamanta44?