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

Leaves_Ga-Young #48

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Leaves_Ga-Young #48

wants to merge 4 commits into from

Conversation

gyjin
Copy link

@gyjin gyjin commented Mar 22, 2020

Stacks and Queues

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

Comprehension Questions

Question Answer
What is an ADT? an object that is described by its method and how it performs
Describe a Stack a data structure that stores data in a LIFO format, such as a stack of plates
What are the 5 methods in Stack and what does each do? initialize: start a new stack. push: add data to the top of the stack. pop: remove data from the top of the stack. empty?: returns whether the stack is empty of data. to_s: returns the stack data in a string form
Describe a Queue a data structure that stores data in a FIFO format, such as a line of customers waiting to check out
What is the difference between implementing something and using something? a user does not need to know how a data structure is implemented. a data structure can be implemented in different ways. however, using that data structure will appear the same to the user.
When is a circular buffer advantageous over a dynamic array or LinkedList? when time and space complexities need to be more efficient, using a circular buffer is better.

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