jackpot@lemmy.mlBanned to Programming@programming.dev · 2 years agowhen is it best to use a recursive function vs a for loopmessage-squaremessage-square49linkfedilinkarrow-up132
arrow-up132message-squarewhen is it best to use a recursive function vs a for loopjackpot@lemmy.mlBanned to Programming@programming.dev · 2 years agomessage-square49linkfedilink
minus-squarespader312@lemmy.worldlinkfedilinkarrow-up1·2 years 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).