jackpot@lemmy.ml to Programming@programming.dev · 1 year agowhen is it best to use a recursive function vs a for loopmessage-squaremessage-square50fedilinkarrow-up134arrow-down13
arrow-up131arrow-down1message-squarewhen is it best to use a recursive function vs a for loopjackpot@lemmy.ml to Programming@programming.dev · 1 year agomessage-square50fedilink
minus-squareFaresh@lemmy.mllinkfedilinkEnglisharrow-up5arrow-down1·1 year agoRecursion is never more efficient than the best equivalent iterative solution. Recursion however allows you to solve some problems very easily and very neatly.
Recursion is never more efficient than the best equivalent iterative solution. Recursion however allows you to solve some problems very easily and very neatly.