jackpot to Programming@programming.dev · 1 year 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 to Programming@programming.dev · 1 year agomessage-square49fedilink
minus-squarebizdelnicklinkfedilinkarrow-up12arrow-down2·1 year agoIMHO almost never. Except for tree traversal, maybe.
minus-squarelivingcoder@programming.devlinkfedilinkarrow-up1·1 year agoI would agree. Only if the performance is extremely similar but the readability (for some reason) is significantly better for the recursive solution would I choose that.
IMHO almost never. Except for tree traversal, maybe.
I would agree. Only if the performance is extremely similar but the readability (for some reason) is significantly better for the recursive solution would I choose that.