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

Queues - Erica J Case - Stacks and Queues #22

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

Conversation

EricaJCasePhD
Copy link

… HW as a unit

Stacks and Queues

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

Comprehension Questions

Question Answer
What is an ADT? An abstract data type is the specification of the desired values, behavior, and interactions that will be imposed on the data. It is explicit definition of the rules data that coding will enforce upon the data.
Describe a Stack ADT in which the user may only access the last value.
What are the 5 methods in Stack and what does each do? 1. push (add a method to the 'top' of the stack; 2. pop: remove and return the last value 3. empty? determine if the stack has length greater than 0. 4. top return last value without removing 5. size return # of elements in the stack
Describe a Queue ADT in which the user may only access the value entered longest ago (ie first).
What are the 5 methods in Queue and what does each do? 1. enqueue (add a method to the 'back' of the queue; 2. dequeue: remove and return the first value 3. empty? determine if the queue has length greater than 0. 4. top return first value without removing 5. size return # of elements in the queue
What is the difference between implementing something and using something? Using something is operating a tool someone else designed. Implementing something is creating the tool. In the programming a data structure, implementation is explicitly defining the rules of an ADT through code. Use is running that code

OPTIONAL JobSimulation

Question Answer
Did you include a sample run of your code as a comment? Nope. Didn't do it.

@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

Looks good

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