jackpot@lemmy.ml to Programming@programming.dev · 11 months agowhen is it best to use a recursive function vs a for loopmessage-squaremessage-square49fedilinkarrow-up133arrow-down13
arrow-up130arrow-down1message-squarewhen is it best to use a recursive function vs a for loopjackpot@lemmy.ml to Programming@programming.dev · 11 months agomessage-square49fedilink
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).