Ordered Table Analysis - Summary (so far)
Runtimes for Ordered Table Operations |
Operation |
Average Case |
Worst Case |
Insert(k,d) |
Θ(n) | O(n) |
Remove(k) |
Θ(n) | O(n) |
Retrieve(k,d) |
Θ(log n) | Θ(log n) |
|
(n = size of table) |
|
- Based on OVector implementation of Set<Entry> model
- For applications with many searches and few Insert operations,
this is a worthy choice
- Example: Password Server
- Very good search time due to very good algorithms (binary search)
- Lackluster performance for Insert/Remove due to limitations on data structure (vector, list)
- Improve Insert time? Need better data structure
These will be improved using binary search trees and improved again using
balanced BSTs.
|