Answer the following questions for each of the data structures you implemented as part of this project.
-
What is the runtime complexity of
enqueue? -
What is the runtime complexity of
dequeue? -
What is the runtime complexity of
len?
-
What is the runtime complexity of
insert? -
What is the runtime complexity of
contains? -
What is the runtime complexity of
get_max?
-
What is the runtime complexity of
_bubble_up? -
What is the runtime complexity of
_sift_down? -
What is the runtime complexity of
insert? -
What is the runtime complexity of
delete? -
What is the runtime complexity of
get_max?
-
What is the runtime complexity of
ListNode.insert_after? -
What is the runtime complexity of
ListNode.insert_before? -
What is the runtime complexity of
ListNode.delete? -
What is the runtime complexity of
DoublyLinkedList.add_to_head? -
What is the runtime complexity of
DoublyLinkedList.remove_from_head? -
What is the runtime complexity of
DoublyLinkedList.add_to_tail? -
What is the runtime complexity of
DoublyLinkedList.remove_from_tail? -
What is the runtime complexity of
DoublyLinkedList.move_to_front? -
What is the runtime complexity of
DoublyLinkedList.move_to_end? -
What is the runtime complexity of
DoublyLinkedList.delete?a. Compare the runtime of the doubly linked list's
deletemethod with the worst-case runtime of the JSArray.splicemethod. Which method generally performs better?