In: Computer Science
Q. What does it mean when we say a data structure is dynamic?
Its size in memory is fixed.
It contains functions for operating on the data it contains.
Its behavior changes in response to its environment.
It is capable of expanding and contracting as data is added and removed.
Q. If we had a class named MapData, how would we declare its destructor?
delete[] MapData();
destructor* MapDataDestructor();
NULL_PTR this->MapData();
~MapData();
Q. When traversing a singly-linked list with a dummy header node, where do we begin the traversal pointer?
At element 0.
At the pointer to the first node.
At the first node's next pointer.
At null.
Q. What is the main difference between a queue and a stack?
A stack requires that insertions and deletions are done on the same end of the list, and a queue requires insertions on one end and deletions on the other.
A stack can have iterators and a queue cannot.
A stack is static and a queue is dynamic.
A stack is constrained in regards to insertions and delections, while a queue is not.
Q. For which of the following purposes would a singly-linked list be the best choice of data structure?
Storing a collection of a fixed number of objects or values.
Storing a set of data that is regularly being reordered under different conditions.
Storing a sequence of objects or values that must be maintained in numerical or alphabetical order.
Storing a large set of data that must be quickly indexed in real time.
Q. Which of the following purposes would be a good job for a queue?
Keeping a small collection of objects that can be accessed in a random fashion.
Storing a frequently-modified set of values that must be maintained in numerical or alphabetical order.
An undo feature in an application.
A place to gather network messages on a server in the order that they were received.
Q. A stack is useful anytime we want to ____.
Preserve the original order of somthing.
Reverse the order of something.
Limit the number of instances of something.
Implement additional security measures on something.
Q. When searching an unordered linked list for a specific data item, how will we know if the item is not found?
The traversal pointer reaches the end of the list.
The traversal pointer returns to the beginning of the list.
The traversal pointer reaches a node whose value is greater than the value we are seeking.
The traversal pointer reaches a node whose value is less than the value we are seeking.
Q. Which of the following applications would be well suited to a stack?
Storing a large set of data that must be quickly indexed in real time.
Keeping a small collection of objects that can be accessed in a random fashion.
A place to gather network messages on a server in the order that they were received.
An event tracker that shows the most recent event first.
Q. What does it mean when we say a data structure is dynamic?
It is capable of expanding and contracting as data is added and removed.
Q. If we had a class named MapData, how would we declare its destructor?
~MapData();
Q. When traversing a singly-linked list with a dummy header node, where do we begin the traversal pointer?
At the pointer to the first node.
Q. What is the main difference between a queue and a stack?
A stack requires that insertions and deletions are done on the same end of the list, and a queue requires insertions on one end and deletions on the other.
Q. For which of the following purposes would a singly-linked list be the best choice of data structure?
Storing a set of data that is regularly being reordered under different conditions.
Q. Which of the following purposes would be a good job for a queue?
A place to gather network messages on a server in the order that they were received.
Q. A stack is useful anytime we want to ____.
Reverse the order of something.
Q. When searching an unordered linked list for a specific data item, how will we know if the item is not found?
The traversal pointer reaches the end of the list.
Q. Which of the following applications would be well suited to a stack?
An event tracker that shows the most recent event
first.