Похожие чаты

Het guys https://paste.ubuntu.ir/tgbh would you please take a look at this code

and tell me why
recursive solution is faster than iteration?
or what is the problem od my code?

4 ответов

11 просмотров

is not faster, your test is wrong write a benchmark and compare the result

"Mahdi"- Автор вопроса
Milad
is not faster, your test is wrong write a benchma...

yeah i have tested their benchmark but how my test is wrong(with time package) ?

"Mahdi"
screenshot yeah i have tested their benchmark but how my tes...

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 :)

Похожие вопросы

Карта сайта