Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daniela - Leaves #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Daniela - Leaves #49

wants to merge 1 commit into from

Conversation

dnsanche
Copy link

Sorry for submitting so late!

Stacks and Queues

Thanks for doing some brain yoga. You are now submitting this assignment!

Comprehension Questions

Question Answer
What is an ADT? It's a data structure that has its implementation hidden from the user.
Describe a Stack It is a data structure that stores elements in order and when retrieving an element, it returns the last added item. It can be implemented using arrays or linked lists.
What are the 5 methods in Stack and what does each do? pop (removes last element), push (adds an element), size (gives the size), peek (shows element of the top of the stack), is_empty? (returns boolean if stack is empty)
Describe a Queue It is a data structure that stores elements in order, and when retrieving an element, it returns the first element added to the queue and so on. It can be implemented using arrays or linked lists.
What is the difference between implementing something and using something? When implementing a data structure, we are defining what will each available method on the user interface will do when its called by the user. However, the user will not know how it is implemented .
When is a circular buffer advantageous over a dynamic array or LinkedList?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant