Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
crimsonaluca20
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
crimsonaluca20
6y ago
For the code above memory complexity is still O(N) even in a language that optimizes for tail calls. This occurs because you have an additional expression that occurs AFTER your recursive call that means the system must hold everything on t
2.
▲
by
crimsonaluca20
6y ago
>(Basically, in Haskell or Scheme your recursion will be compiled into the same machine language sequence of straight-line code plus conditional jump as the iterative loop.) This is not true. The recursive code will not compile with zero