+ 4
Loops always have less overhead than recursion, but are sometimes harder to use depending on the algorithm. The overhead from recursion comes from pushing a new stack frame onto the stack with each call, and thus you run the risk of getting a stack overflow error.
27th Mar 2017, 4:52 AM
Squidy
Squidy - avatar