Fast Sequences

Ross Paterson ross at
Mon Mar 27 03:16:18 EST 2006

On Sun, Mar 26, 2006 at 10:54:59PM -0500, Jim Apple wrote:
> How about
> (flip index i) . reverse
> Is that O(i)?

index i is O(log(min(i,n-i))), because the index operation skips many
subtrees on the way.  This skipping will also mean that putting a
reverse first won't change the big-O complexity.

More information about the Libraries mailing list