1. (a) O(1) time. Explanation: It only requires inserting an element at the tail (which takes O(1) time, since we've got a tail pointer) and updating the tail pointer. (b) O(1) time. Explanation: It only requires deleting an element from the head (which takes O(1) time, since we've got a head pointer) and updating the head pointer. 2. (a) O(lg N) time, since the heap has depth at most O(lg N). Explanation: Insertion into a binary heap involves adding the element at the bottom of the heap, then possibly swapping with the parent and bubbling it up the tree. Since the tree has depth O(lg N), we do at most O(lg N) steps of work. (a) O(lg N) time, since the heap has depth at most O(lg N). Explanation: Deleting the minimum of a binary heap involves replacing the root with some other entry, then possibly swapping it with a child and bubbling it down the tree. Since the tree has depth O(lg N), we do at most O(lg N) steps of work. Comment: There are other, more complex data structures that allow one to build a priority queue where deletemin() takes O(lg N) time and where insert() takes O(1) time (e.g., a Fibonacci heap). However these data structures are more complex to implement and so are not used as often as the simpler implementation using a binary heap.