AgreeableLandscape@lemmy.mlM to Programmer Humor@lemmy.ml · 3 years agoThe O(1) Fibonacci implementationlemmy.mlimagemessage-square7fedilinkarrow-up149arrow-down13
arrow-up146arrow-down1imageThe O(1) Fibonacci implementationlemmy.mlAgreeableLandscape@lemmy.mlM to Programmer Humor@lemmy.ml · 3 years agomessage-square7fedilink
minus-squareEphera@lemmy.mllinkfedilinkarrow-up1·3 years agoI was gonna say you could probably actually have that properly calculated and O(1), if you stuck the result in a lazy list. But then I realized this hard-coded implementation probably already exhausts ulong, so there really is no point to that.
I was gonna say you could probably actually have that properly calculated and O(1), if you stuck the result in a lazy list. But then I realized this hard-coded implementation probably already exhausts
ulong
, so there really is no point to that.