Exam 19: Custom Templatized Data Structures

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

In general, linked lists allow:

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

B

Select the incorrect statement. Binary search trees (regardless of the order in which the values are inserted into the tree):

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

C

Which of the following statements about stacks is incorrect?

Free
(Multiple Choice)
4.9/5
(37)
Correct Answer:
Verified

B

Which of the following is a self-referential object?

(Multiple Choice)
4.8/5
(32)

Which of the following tasks would a binary search tree not be well suited for?

(Multiple Choice)
4.9/5
(33)

The pointer member in a self-referential class is referred to as a:

(Multiple Choice)
4.9/5
(40)

How many pointers are contained as data members in the nodes of a circular, doubly linked list of integers with five nodes?

(Multiple Choice)
4.8/5
(37)

__________ is not an advantage of linked lists when compared to arrays.

(Multiple Choice)
4.9/5
(33)

Which of the following is not a dynamic data structure?

(Multiple Choice)
4.8/5
(35)

Which data structure represents a waiting line and limits insertions to be made at the back of the data structure and limits removals to be made from the front?

(Multiple Choice)
4.8/5
(35)

A queue performs the following commands (in pseudo-code): enqueue 4, 6, 8, 3, 1 Dequeue three elements Enqueue 3, 1, 5, 6 Dequeue two elements What number is now at the front of the queue?

(Multiple Choice)
4.8/5
(31)

What kind of linked list begins with a pointer to the first node, and each node contains a pointer to the next node, and the pointer in the last node points back to the first node?

(Multiple Choice)
4.8/5
(40)

A linked list has the functions insertAtFront, removeFromFront, insertAtBack and removeFromBack, which perform operations on nodes exactly as their names describe. Which two functions would most naturally model the enqueue and dequeue operations, respectively, of a queue?

(Multiple Choice)
4.8/5
(37)

A stack is initially empty, then the following commands are performed: push 5 Push 7 Pop Push 10 Push 5 Pop Which of the following is the correct stack after those commands (assume the top of the stack is on the left)?

(Multiple Choice)
4.9/5
(34)

For a non-empty linked list, select the code that should appear in a function that adds a node to the end of the list. newPtr is a pointer to the new node to be added and lastPtr is a pointer to the current last node. Each node contains a pointer nextPtr.

(Multiple Choice)
4.8/5
(38)

If you add the following nodes to a binary search tree in the order they appear (left-to-right): 6 34 17 19 16 10 23 3 What will be the output of a postorder traversal of the resulting tree?

(Multiple Choice)
5.0/5
(41)

If you have a 1000-element balanced binary search tree, what is the maximum number of comparisons that may be needed to find an element in the tree?

(Multiple Choice)
4.9/5
(40)
close modal

Filters

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