jackpot@lemmy.ml to Programming@programming.dev · 1 year agowhen is it best to use a recursive function vs a for loopmessage-squaremessage-square49fedilinkarrow-up132
arrow-up132message-squarewhen is it best to use a recursive function vs a for loopjackpot@lemmy.ml to Programming@programming.dev · 1 year agomessage-square49fedilink
minus-squarefiah@discuss.tchncs.delinkfedilinkarrow-up3·1 year 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