and tell me why
recursive solution is faster than iteration?
or what is the problem od my code?
is not faster, your test is wrong write a benchmark and compare the result
yeah i have tested their benchmark but how my test is wrong(with time package) ?
well, I believe is because of the stack if you swap the iterative function with the recursive one you could see the same result the first one is take longer
because its not :)
Обсуждают сегодня