Exam 5: Linked Lists

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

A linked list contains components,called ______,which are linked to one another.

Free
(Multiple Choice)
4.7/5
(39)
Correct Answer:
Verified

A

What does a traversal operation do?

Free
(Essay)
5.0/5
(36)
Correct Answer:
Verified

A traversal operation sequentially visits each node in a list until it reaches the end of the list.

Which of the following statements is used to insert a new node,referenced by newNode,at the end of a linear linked list?

Free
(Multiple Choice)
4.8/5
(41)
Correct Answer:
Verified

A

When a linked list is empty,the value of the head reference is null.

(True/False)
4.9/5
(45)

Which of the following is NOT true about all circular linked lists?

(Multiple Choice)
4.9/5
(42)

A reference variable declared as a data field within a class has the default value ______.

(Multiple Choice)
4.8/5
(37)

What does a node of a linear linked list contain?

(Essay)
4.7/5
(41)

A local reference variable has a default value of null.

(True/False)
4.9/5
(40)

What is a head record?

(Essay)
4.7/5
(32)

Write the code segment which is used to insert a new node,referenced by the reference variable newNode,between the nodes referenced by the reference variables prev and curr in a linear linked list.

(Short Answer)
4.9/5
(26)

Why is a loop necessary to find an arbitrary node in a linked list?

(Essay)
4.9/5
(42)

Which of the following is true about a circular doubly linked list?

(Multiple Choice)
4.8/5
(26)

What is the difference between a linked list and an array in terms of their capacity to store data?

(Essay)
4.9/5
(29)

Every node in a circular linked list has a successor.

(True/False)
4.9/5
(32)

Suppose we want to write a loop that traverses a doubly-linked circular linked list.Assume that each node has a prev and a next reference,and the list itself maintains a reference to a head node.What is wrong with this loop header? for (Node curr = head;curr != head.prev;curr = curr.next)

(Short Answer)
4.9/5
(29)

In a linear linked list,______.

(Multiple Choice)
4.7/5
(37)

If you attempt to use a reference variable before it is instantiated,a(n)______ will be thrown.

(Multiple Choice)
4.9/5
(38)

Write the code segment that is used to insert a new node,referenced by the reference variable newNode,at the beginning of a linear linked list.

(Short Answer)
4.8/5
(39)

Name two advantages of implementing the ADT list as a linked list (reference based)instead of an array.

(Essay)
4.9/5
(44)

In Java,every class is ultimately derived from the class _____ through inheritance.

(Multiple Choice)
4.9/5
(33)
Showing 1 - 20 of 60
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)