Quiz Intro to Linked List

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Assume you have a list with 4 elements: A, B, C, and E [ A | 1322 ] ---> [ B | 6543 ] ---> [ C | 2345 ] ----> [ E | 4321 ] Now you want to insert D, which is stored on address 9876 D should be inserted between C and E. Assume you have one variable (pointer) p that has a reference to [ C | 2345 ] and you have a reference to the new node ( D ) that needs to be inserted into the list Which steps should you take in what order? I, II, III, or IV ( I ) 1.set the next pointer of C to 9876(D) 2.set the next pointer of D to 4321(E) ( II ) 1. set the next pointer of D to 4321(E) 2. set the next pointer of C to 9876(D) ( III ) 1.set the next pointer of D to 2345(C) 2.set the next pointer of E to 9876(D) ( IV ) 1. set the next pointer of E to 9876(D) 2. set the next pointer of D to 2345(C)

( II )

Complete the sentence below: Each element in a Linked-List is called a ________________ .

Node

Linked Lists CANNOT be re-sized once they have been created.

False

Which combination of properties best describes a list? -ordered collection, can have duplicates -unordered collection, can have duplicates -ordered collection, no duplicates -unordered collection, no duplicates

ordered collection, can have duplicates

Inserting an element at a specific location of an array is a fairly expensive operation.

True

In order to determine where a linked list starts we use a reference to the beginning of the list. This reference is usually called ___________________ .

head


संबंधित स्टडी सेट्स

Chapter 11 Objectives Anatomy A&P

View Set

Ch 6 - Values, Ethics, and Advocacy

View Set

12. Change Management and Stress

View Set

Fundamentals Turning Point Questions

View Set

CHAPTER 10 MINI SIM ON HUMAN RESOURCE MANAGEMENT QUESTIONS

View Set

Fundamentals of Nursing Week 3 Practice Questions

View Set