Jump to content

User:Xionbox/Algorithms

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Xionbox (talk | contribs) at 09:06, 11 July 2011 (Added info from List data structure comparison). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Data structures

  Linked list Array Dynamic
array
Balanced
tree
Search Θ(n) Θ(1) Θ(1) Θ(log n)
Insert/delete at beginning Θ(1) Θ(n) Θ(log n)
Insert/delete at end Θ(1) Θ(1) amortized Θ(log n)
Insert/delete in middle search time +
Θ(1)
Θ(n) Θ(log n)
Wasted space (average) Θ(n) 0 Θ(n) Θ(n)