|
 |
Ron Parker <ron### [at] povray org> wrote:
: Actually, I have an associative array (of sorts) that I've written here
: that has an O(1) increment, not amortized. It's a threaded 2-3 tree.
: Indexing is still, of course, O(log n), as are insertion and deletion.
How can the increment of the iterator be O(1) non-amortized with a tree?
Unless you have next-pointers in each node making the container also a
linked list... (well that _is_ a solution but it takes a little bit more
memory).
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |