Question

In: Computer Science

Q. What does it mean when we say a data structure is dynamic?


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.

Solutions

Expert Solution

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.



Related Solutions

Please solve this advanced physics question Q. What does it mean when we say that the...
Please solve this advanced physics question Q. What does it mean when we say that the topological structure of phase space of a two-dimensional simple harmonic oscillator corresponds to a "torus"?
When it comes to dynamic memory allocation and delete[] pointer, what does it mean to say...
When it comes to dynamic memory allocation and delete[] pointer, what does it mean to say that, CRT detected that the application wrote to memory after end of heap buffer? I tried to duplicate the error by deleting the pointer address twice and it didn't produce the same error code so that's not it. What might cause this problem?
What does it mean when we say an interface is 'Up-Up'?
What does it mean when we say an interface is 'Up-Up'?
What does it mean when we say an animal is risk averse?
What does it mean when we say an animal is risk averse?
What does it mean when we say privacy is a prudential right?
What does it mean when we say privacy is a prudential right?
What does it mean when we say an animal is risk averse?
What does it mean when we say an animal is risk averse?
When we say the media is a business, what do we mean by that? How does...
When we say the media is a business, what do we mean by that? How does that affect the way the media cover politics?
What does it mean when we say that money functions as a medium of exchange, as...
What does it mean when we say that money functions as a medium of exchange, as a store of value, and as a unit of account?
What does it mean when we say that an expert has a “fiduciary relationship” with a...
What does it mean when we say that an expert has a “fiduciary relationship” with a client?
• What does it mean when we say that there is a relationship between two variables?...
• What does it mean when we say that there is a relationship between two variables? • What kinds of relationships can there be between two variables? • Give an example of two variables that are related. For example, my daughter has an hourly salary. Her paycheck amount is related to how many hours she worked. • Give an example of two variables that are NOT related. • Why might the regression equation you have found NOT be a good...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT