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

Tests for Queues and Stacks are passing Laura #44

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

Conversation

lmelgarejos
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? Its an acronym for Abstract Data Types. Depending on the type of data that we use in our programs, computers will interact and do certain things rather than others. For example Queues and Stacks. With Queues you would have access only to the first element saved, and with Stacks would be to the last one instead.
Describe a Stack A Stack is a data type that stores this data the way that you only can have access to the very last item "saved" here. Like a very deep narrow round base full of concentric round cup holders. In order to have access to the first that was placed inside, we have to remove all on top of it.
What are the 5 methods in Stack and what does each do? push: Shovel elements, pop: delete the last element, size: number of elements in the Queue, empty?: true if there is nothing in the Queue, to_s: transform an array in to a string.
Describe a Queue Queues is also a data type, but in this case we will have access to the very first item in here rather that the last one. Like in a night club, people who were first in line get into the club, and the last people in line will have to wait to the people in front of them get in.
What are the 5 methods in Queue and what does each do? enqueue: shovel elements, dequeue: Delete the first element saved, front: chooses the first element, size: Number of elements in the Queue, empty?: true if it is nothing the queue.
What is the difference between implementing something and using something?

OPTIONAL JobSimulation

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

@sudocrystal
Copy link

sudocrystal commented Mar 1, 2017

If you don't know the answer to this question:

What is the difference between implementing something and using something?

Then you really should investigate an answer, or we should talk through the answer. It is important vocabulary to have.

@sudocrystal
Copy link

Stacks and Queues

What We're Looking For

Feature Feedback
Implementation of Stack looks complete yes
Implementation of Queue looks complete yes

OPTIONAL JobSimulation

Extension Feedback
Does the code solve the problem to specification?
Is the code easy to follow?
Does the output look good?
Were provided variables and methods used appropriately and not altered in name or definition?
Were any new variables and/or methods made private to the class?

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