Skip to content

Conversation

Jruiz9312
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?
Describe a Stack
What are the 5 methods in Stack and what does each do?
Describe a Queue
What are the 5 methods in Queue and what does each do?
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?

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.

Hi Juliana, while it looks like your implementation may work for whatever classes you were originally looking at, it doesn't work for the starter code we provide. Additionally, the comprehension questions haven't been filled out.

Please try this project again using the starter code and README we have provided for you as the basis for your implementation.

🔴

pass
if self.is_full():
raise QueueFullException
return self.items.insert_at_end(element)

Choose a reason for hiding this comment

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

items and insert_at_end aren't attributes or methods of the Queue class that we provide.

Additionally, it looks like you are implementing a Queue with an array or linked list of some sort, but this project asks you to implement a Queue using a circular buffer.

@@ -12,7 +12,8 @@ def push(self, element):
""" Adds an element to the top of the Stack.
Returns None
"""
pass
self.stack_size += 1
self.stack_list.append(element)

Choose a reason for hiding this comment

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

Again, stack_list and append don't exist as attributes/methods for the LinkedList class we provide

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