Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jacksontale
· 11y ago · 0 comments
Yeah, you are right, I should have mentioned that.
Comments
[–]
marvy
11y ago
But there's an easy fix: don't pick numbers from the given sequence, instead use binary search on [0,n]. Then you're guaranteed only log n iterations.
[–]
jacksontale
OP
11y ago
Hi, I was using pure functional programming style, so list only.