POV-Ray : Newsgroups : povray.off-topic : Trolltech doesn't know how amortized time works : Re: Trolltech doesn't know how amortized time works Server Time
5 Sep 2024 03:23:42 EDT (-0400)
  Re: Trolltech doesn't know how amortized time works  
From: Darren New
Date: 3 Nov 2009 11:35:50
Message: <4af05be6$1@news.povray.org>
Warp wrote:
>   Which is O(n) because you have to get there first.

I think that the insert happens after you already decide where to insert it. 
  What if the insert is always performed after the third element of the 
list? You're back to O(1).

That's like saying appending to the end of an array with enough space is 
O(n) because you first have to search thru the array to ensure the value you 
want to insert isn't already there.

-- 
   Darren New, San Diego CA, USA (PST)
   I ordered stamps from Zazzle that read "Place Stamp Here".


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.