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

Roza -cedar, re-submission including the comprehension questions #16

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

Conversation

haset-19
Copy link

@haset-19 haset-19 commented Jun 4, 2022

Stacks and Queues

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

Comprehension Questions

Question Answer
What is an ADT?
Describe a Stack Is a data structure that stores lists of data but those data can be accessed through last in-first out
What are the 5 methods in Stack and what does each do? size, to return the total elements in a stack, is_empty to check if the stack is empty, pop to remove and return the element on top of the stack, push to insert element on the top, peek, to return top element but not doesn't remove
Describe a Queue is an abstract data structure to store a list of elements like stack but allows access only in first come first out
What are the 5 methods in Queue and what does each do? enqueue to add element at the end, dequeue to remove element from the front, is_empty, to check if the queue is empty, size to calculate the total elements and return,
What is the difference between implementing something and using something? Implementing something the way the implementer prefers and abstracting the details, the data structures used etc, and the user doesn't have to know the details.

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