This preview shows page 1. Sign up to view the full content.
Unformatted text preview: constant, so amortized cost is O(1). If the table is nearly full, or the input data is repeated, the insertion function will have to search through the table for an empty slot, so the actual cost will involve the cost of the insertion plus the cost of the search which will not necessarily be O(1)....
View Full Document
- Spring '09