jackpot@lemmy.ml to Programming@programming.dev · 11 months agowhen is it best to use a recursive function vs a for loopmessage-squaremessage-square52fedilinkarrow-up134arrow-down13
arrow-up131arrow-down1message-squarewhen is it best to use a recursive function vs a for loopjackpot@lemmy.ml to Programming@programming.dev · 11 months agomessage-square52fedilink
minus-squarespader312@lemmy.worldlinkfedilinkarrow-up1·11 months agoJust adding on that recursion could be problematic if used in the wrong way, like too many calls can over flow the call stack (assuming the compiler is not able to optimize that away).
Just adding on that recursion could be problematic if used in the wrong way, like too many calls can over flow the call stack (assuming the compiler is not able to optimize that away).