Reference no: EM132399153
Can you help me with this Multiple Choice please?
1. What is the run-time complexity of inserting a new element at the beginning of a circular, doubly-linked list with a sentinel head?
(a) O(1) (b) O(logN) (c) O(N) (d) O(N2)
2. What is the run-time complexity of locating and deleting a speci?ed key from a hashtable containing N key/value pairs?
(a) O(1) (b) O(logN) (c) O(N) (d) O(N2)
3. What is the run-time complexity of increasing the number of buckets and rehashing all elements into the new buckets in a hashtable, given N key/value pairs?
(a) O(1) (b) O(logN) (c) O(N) (d) O(N2)
4. Given a circular, doubly-linked list whose contents are sorted in ascending order, what is the run-time complexity for inserting a new element into the list so that it remains correctly sorted? (Including the time required to search for the element's correct position.)
(a) O(1) (b) O(logN) (c) O(N) (d) O(N2)