Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
C++ How to Program
Quiz 19: Custom Templatized Data Structures
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 1
Multiple Choice
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?
Question 2
Multiple Choice
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?
Question 3
Multiple Choice
How many pointers are contained as data members in the nodes of a circular, doubly linked list of integers with five nodes?
Question 4
Multiple Choice
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?
Question 5
Multiple Choice
Which of the following is a self-referential object?
Question 6
Multiple Choice
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?
Question 7
Multiple Choice
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?
Question 8
Multiple Choice
The pointer member in a self-referential class is referred to as a:
Question 9
Multiple Choice
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.
Question 10
Multiple Choice
Select the incorrect statement. Binary search trees (regardless of the order in which the values are inserted into the tree) :
Question 11
Multiple Choice
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) ?