if (++) were left associative ?

Konst Sushenko konsu@microsoft.com
Sun, 7 Apr 2002 14:08:48 -0700


>=20
> I don't think so.  I think it only takes linear time to get the head.
> But once you've gotten the head, it takes linear time again to get the
> head of the tail, ....  You get (I think...) a progression like
> n+(n-1)+(n-2)+...+1, which is in O(n^2).
>=20

What does 'n' denote?

The get the head, it takes time proportional to the number of (++)
invocations. Is that what you mean?

konst