Ch. 17 - Linked Lists Short Answer

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

How is the end of a linked list usually signified?

Usually the last node point to NULL(Address 0).

What does "traversing the list" mean?

It means traveling through the list.

What advantage does a linked list have over the STL vector?

Linked lists advantage is the speed at which a node may be inserted into or deleted from the list.

What is a singly linked list? What is a doubly linked list? What is a circularly linked list?

Single - Each node is linked to a single other node. Double - Each node not only points to the next node, but also the previous one. Circular - The last node of the list points to the first node.

What is a list head?

A pointer that usually points to the first node of the list.

What are some of the advantages that linked lists have over arrays?

- Linked List is a dynamic data structure which creates memory according to its requirement that is; it can change memory size at run time, so it has no memory loss. Array is a static data structure that is fixed in size and cannot change at run time, so it wastes memory. - Insertion and Deletion operations of linked lists are easier than array insertion and deletion. - It utilizes the memory in efficient manner, array wastes memory size.

What are two steps required to delete a node from a linked list?

- Remove the node from the list without breaking the links created by the next pointers. - Delete the node from memory.

What is a self-referential data structure?

A data structure that contains a pointer to an object of the same type as that being declared.

What is the advantage of using a template to implement a linked list?

A template can easily create and store any kind of data (or data structure) in linked lists.

What is the difference between appending a node and inserting a node?

Appending - Adding the node at the end of the list. Inserting - Adding a node to the list, not necessarily at the end.

Name five basic linked list operations.

Appending a node, traversing a node, inserting a node, deleting a node, destroying the list.

What type of linked list is the STL list container?

Doubly Linked List


Set pelajaran terkait

Mastering Biology Chapter 27 HW 1

View Set

From Mona Lisa to Modernism Exam III

View Set

Chapter 63: Management of Patients with Neurologic Trauma

View Set