Question: Q1. When inserting a new item into a linked list somewhere after the beginning, but before the end, how many of the nodes already on

Q1. When inserting a new item into a linked list somewhere after the beginning, but before the end, how many of the nodes already on the linked list will have their next pointer updated?

a. 0
b. 1

c. 2

Q2. Disregarding any references or pointers in data elements, i.e., the info components, how many null pointers are there in a properly maintained, doubly linked list that is not empty?

a. 0
b. 1
Q3. Which methods in our initial array-based implementation of the project #2 ListInterface needed to be changed in order to have a sorted list ADT? Select all that apply.

As a reminder, the initial implementation included a remove( ) operation/method that replaced the item to be removed with the last item on the list, and then set the array position where the last item had been to null.

a. remove( )

b. contains( )

c. find( )

d. getNextItem( )

e. add( )

Q4. Check which items listed below, if any, are required in order to perform a Binary Search:

a.items to be searched must be arranged in a Binary Search Tree

b.items to be searched must be sorted

c. there must be at least 25 items to be searched

Q5. What is the Big-O notation that indicates the time complexity for a binary search of N items?

a. O(1)

b. O(log N)

c.O(N)

d. O(N log N)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!