3 ms·
Yeah, you are right, I should have mentioned that.
by jacksontale 12y ago
Yeah, you are right, I should have mentioned that.
- marvy 12y agoBut 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 12y agoHi, I was using pure functional programming style, so list only.