AgreeableLandscapeM to Programmer Humor · 3 years agoThe O(1) Fibonacci implementationimagemessage-square8fedilinkarrow-up162arrow-down14
arrow-up158arrow-down1imageThe O(1) Fibonacci implementationAgreeableLandscapeM to Programmer Humor · 3 years agomessage-square8fedilink
minus-squareEpheralinkfedilinkarrow-up2·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.