jackpot@lemmy.mlBanned to Programming@programming.dev · vor 2 Jahrenwhen is it best to use a recursive function vs a for loopmessage-squaremessage-square52linkfedilinkarrow-up134arrow-down13
arrow-up131arrow-down1message-squarewhen is it best to use a recursive function vs a for loopjackpot@lemmy.mlBanned to Programming@programming.dev · vor 2 Jahrenmessage-square52linkfedilink
minus-squarefiahlinkfedilinkarrow-up3·vor 2 Jahren 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