Question: 1) True or False: Based on the implementation described in Module 6, the first item in a doubly linked list is stored in the head
1) True or False: Based on the implementation described in Module 6, the first item in a doubly linked list is stored in the head node.
A) True
B) False
2) For an ArrayList based on the implementation described in Module 6, what would be the approximate best case running time of the add(Object obj) method if the internal array of the ArrayList were resized every time an item was added? (Choose the best answer.)
A) O(N)
B) O(1)
C) O(N2)
D) O(2N)
3) For the implementations given in this course, what is the worst case running time of the contains(Object obj) method for both the ArrayList and LinkedList classes?
A) O(1)
B) O(N/2)
C) O(N)
D) None of the above.
4) For the implementations given in this course, what is the worst case running time of the add(int index, Object obj) method for the LinkedList class?
A) O(1)
B) O(N)
C) None of the above.
D) O(N/2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
