Fn \ Struct
|
Unsorted
Array
|
Value-Indexed
Array
|
Sorted
Array
|
Unsorted Singly
Linked-List
|
Sorted Singly
Linked-List
|
Unsorted Doubly
Linked-List
|
Sorted Doubly
Linked-List
|
Balanced
Binary Tree
|
Heap
|
Hash Table
|
Search
|
O(n)
|
O(1)
|
O(log n)
|
O(n)
|
O(n)
|
O(n)
|
O(n)
|
O(log n)
|
O(n)
|
O(1)
|
Insert
|
O(1)
|
O(1)
|
O(n)
|
O(1)
|
O(n)
|
O(1)
|
O(n)
|
O(log n)
|
O(log n)
|
O(1)
|
Delete
|
O(1)
|
O(1)
|
O(n)
|
O(n)*
|
O(n)*
|
O(1)
|
O(1)
|
O(log n)
|
O(n)
|
O(1)
|
Successor
|
O(n)
|
O(n)
|
O(n)
|
O(1)
|
||||||
Predecessor
|
O(n)
|
O(n)*
|
O(n)
|
O(1)
|
||||||
Min
|
O(n)
|
O(n)
|
O(n)
|
O(1)
|
||||||
Max
|
O(n)
|
O(1)*
|
O(n)
|
O(1)
|
||||||
Space Usage
|
O(n)
|
O(n)
|
O(n)
|
O(n)
|
O(n)
|
O(n)
|
O(n)
|
O(n)
|
O(n)
|
O(n)
|
Hard-to-find tips on otherwise easy-to-do tasks involving everyday technology, with some advanced insight on history and culture thrown in. Brought to you by a master dabbler. T-S T-S's mission is to boost your competitiveness with every visit. This blog is committed to the elimination of the rat from the tree of evolution and the crust of the earth.
Thursday, February 16, 2017
Steve Skiena and Mobiletainment : Data Structure Tradeoffs
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment