-
Notifications
You must be signed in to change notification settings - Fork 63
tests passing #35
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
base: master
Are you sure you want to change the base?
tests passing #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Veronica, I'm grading this as a red as your Stack implementation doesn't use a LinkedList which we do want you to practice using. We'd also like for you to make an attempt at the comprehension questions.
I'd be happy to regrade when you resubmit.
🔴
Raises a QueueFullException if all elements | ||
In the store are occupied | ||
returns None | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
|
||
|
||
|
||
def dequeue(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
return self.store[self.front] | ||
|
||
|
||
def front(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
return self.store[self.front] | ||
|
||
|
||
def size(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
pass | ||
return self.size | ||
|
||
def empty(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
else: | ||
return False | ||
|
||
def __str__(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
stacks_queues/stack.py
Outdated
|
||
def __init__(self): | ||
self.store = LinkedList() | ||
# self.store = LinkedList() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LinkedList
class in your implementation. The reason is that we want you to get more practice using (in addition to implementing) linked lists as they are commonly used in interviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨ Nice work! Thanks for updating. For the difference between implementing v using. Implementing means to write or implement a function/piece of code yourself. Using means to just call or reuse code that someone else wrote/implemented. Think about when you use functions from a library or imported module or call an API, vs you implementing your own set of functions or your own API.
Let me know what questions you have!
🟢
self.store = LinkedList() | ||
# self.store = list() | ||
|
||
def push(self, element): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
|
||
|
||
|
||
def pop(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
""" | ||
pass | ||
|
||
if self.store.length() == 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
And False otherwise | ||
""" | ||
pass | ||
if self.store.length() == 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
ending with the bottom of the Stack. | ||
""" | ||
pass | ||
string_stack = self.store[::-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
Stacks and Queues
Thanks for doing some brain yoga. You are now submitting this assignment!
Comprehension Questions
OPTIONAL JobSimulation