Skip to content

Sarah Jane Olivas - Spruce - C16#53

Open
sjolivas wants to merge 5 commits intoAda-C16:masterfrom
sjolivas:master
Open

Sarah Jane Olivas - Spruce - C16#53
sjolivas wants to merge 5 commits intoAda-C16:masterfrom
sjolivas:master

Conversation

@sjolivas
Copy link

@sjolivas sjolivas commented Jul 19, 2022

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 Type - is a class for objects whose behavior is defined by a set of values and a set of operations. Describe the process of how to solve an algorithm but not how these methods will be implemented.
Describe a Stack LIFO - A Stack is a data structure which stores a list of data and only provides access in a Last-In-First-Out (LIFO) order
What are the 5 methods in Stack and what does each do? push(element) -> puts item at top of the stack, pop -> removes and returns the item at the top of the stack, is_empty -> bool, returns True if empty stack and false if not empty stack
Describe a Queue FIFO - works with data in a First In First Out (FIFO) order.
What are the 5 methods in Queue and what does each do? enqueue -> Adds an element to the queue, dequeue -> Removes and returns an element from the queue , front -> Returns the element from the front of the queue, size -> Returns the number of elements in a queue, empty -> bool - returns True if the queue is empty and false if not empty
What is the difference between implementing something and using something? implementing is using an idea to create a process, using something is taking that implementation and doing something with it

OPTIONAL JobSimulation

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

Copy link

@kyra-patton kyra-patton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Nice work, Sarah. It looks like you forgot to fill out __str__ for the Stack class and I left a few other comments, but overall you have solid implementations. Let me know what questions you have.

For the comprehension questions, try defining what an Abstract Data Type is beyond just want the initials stand for.

🟢

And False otherwise
"""
pass
return self.store.length() == 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ However, you could consider taking advantage of the empty method in LinkedList

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