jackpot@lemmy.mlBanned to Programming@programming.dev · 3 years agowhen is it best to use a recursive function vs a for loopmessage-squaremessage-square19linkfedilinkarrow-up12arrow-down10
arrow-up12arrow-down1message-squarewhen is it best to use a recursive function vs a for loopjackpot@lemmy.mlBanned to Programming@programming.dev · 3 years agomessage-square19linkfedilink
minus-squarefiah@discuss.tchncs.delinkfedilinkarrow-up1·3 years ago If you are compelled to make a recursive algorithm iterative, consider using an explicit stack. yep, did that once to solve a specific problem, worked fine and if I recall correctly I could do it without making a total mess of my code
yep, did that once to solve a specific problem, worked fine and if I recall correctly I could do it without making a total mess of my code