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

Water - Jessica #33

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

Water - Jessica #33

wants to merge 6 commits into from

Conversation

jwinchan
Copy link

Stacks and Queues

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

Comprehension Questions

Question Answer
What is an ADT? Abstract Data Types are objects that are defined by their methods and how the methods perform
Describe a Stack A stack is an ADT that stores data in a Last In First Out structure
What are the 5 methods in Stack and what does each do? push: adds new data to the top of the stack, pop: removes data from the top of the stack, is_empty: returns a boolean depending on whether the stack is empty or not, peek: returns the data at the top of the stack without removing, size: returns the number of items stored in the stack
Describe a Queue A stack is an ADT that stores data in a First In First Out structure
What are the 5 methods in Queue and what does each do? enqueue: adds new data to the back of the queue, dequeue: removes data from the front of the queue, is_empty: returns a boolean depending on whether the queue is empty or not, size: returns the number of items stored in the queue, front: returns the data at the front of the queue without removing
What is the difference between implementing something and using something? Implementation is the behind-the-scenes creation of methods, ADTs, classes, etc. On the other hand, using those methods, ADTs, classes doesn't require knowledge of how they are implemented.

OPTIONAL JobSimulation

Question Answer
Did you include a sample run of your code as a comment?

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.

2 participants