Y
Hacker News
new
|
ask
|
show
|
jobs
by
jacksontale
4145 days ago
Yeah, you are right, I should have mentioned that.
1 comments
marvy
4142 days 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.
link
jacksontale
4136 days ago
Hi, I was using pure functional programming style, so list only.
link