@AgreeableLandscapeM to Programmer Humor • 2 years agoThe O(1) Fibonacci implementationimagemessage-square8arrow-up162arrow-down14
arrow-up158arrow-down1imageThe O(1) Fibonacci implementation@AgreeableLandscapeM to Programmer Humor • 2 years agomessage-square8
minus-squareEpheralink2•2 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.