Search data structure: Difference between revisions

Content deleted Content added
Added balancing speed to the table to distinguish between data structures that would otherwise appear similar.
Asymptotic amortized worst-case analysis: Trees don't always require balancing, so making this O(1), added Tries to the list.
Line 45:
| O(''n'')
| N/A
| N/AO(1)
| O(''n'')
| O(''n'')
Line 54:
| O(''n'')
| O(''n'')
| N/A
| O(''n'')
| O(1)
| O(log ''n'')
Line 74:
| O(1)
| O(1)
| N/A
| O(''n'')
| O(''n'')
| O(''n'')
Line 82:
|-
| [[Self-balancing binary tree]]
| O(log ''n''1)
| O(log ''n''1)
| O(log ''n'')
| N/A
Line 92:
|-
| [[Heap (data structure)|Heap]]
| O(log ''n''1)
| O(log ''n''1)
| O(log ''n'')
| N/A
Line 110:
| O(''n'')
| O(''n'')
|-
[ [[Trie]]
| O(''nm'')
| O(''m'')
| N/A
| N/A
| O(''m'')
| O(''m'')
| O(''m'')
| O(''n'')
|}