Always analyze the running time and explain why the algorithm is correct. No code, please.
Question 4: Suppose elements have two keys. The first key is not unique, meaning there may be many elements with the same first key. However, each element also has a second key, and the second keys are pairwise disjoint. The keys are numbers.
Show how to implement the following operations:
1. FindS(key1, key2): This operation finds the unique element with the given two keys.
2. Insert(S, k1, k2): This operation adds an element with the first key k1 and second key k2 into the data structure S.
3. DeleteS(k1): This operation removes all elements whose first key is k1.
Remark: It is possible to perform all the above operations in much less than O(n) time.