Unformatted text preview: set S of integers: • Insert( S,x ) inserts x into S . • Delete-Larger-Half( S ) deletes the largest ⌈ S/ 2 ⌉ elements from S . Explain how to implement this data structure so that any sequence of m operations runs in O ( m ) time. 1...
View Full Document
- Spring '10
- English, Analysis of algorithms, Amortized analysis, Fall Semester Tutorial, COMP 271H Design