Memory vs Disk Data Structures
Example: Binary Search of a sorted array
- Needs O(Log2N) operations
How many accesses if 1,000,000 integers in memory?
- The answer (20) is acceptable
How many seeks if 1,000,000 records on disk?
- The answer (20) in unacceptable
- Worse problem:And how did they get sorted (NlogN at best)?