Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1. In the preceding problem, if there have been no removals, what is the remaining capacity of the underlying array when the list includes the

Q1. In the preceding problem, if there have been no removals, what is the remaining capacity of the underlying array when the list includes the names of all 30 movies?

Q2. What value is returned by the size( ) method for a list object from a list ADT class that implements the project #2 ListInterface, if just after instantiation, the following operations were performed immediately prior to calling size( )?

list.add(17) list.add(23) list.add(29) list.add(37) list.add(23) list.get(29) list.add(17) list.add(19) list.remove(23)

a. 4 b. 5 c. 6 d. 7

Q3. When inserting a new item into a linked list at the beginning, or head, how many of the nodes already on the linked list will have their next pointer updated?

a. 0 b. 1 c. 2

Q4.

When inserting a new item into a linked list at the end, or tail, how many of the nodes already on the linked list will have their next pointer updated?

a. 0 b. 1 c. 2 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

The salting in of proteins can be explained by:

Answered: 1 week ago