-
Notifications
You must be signed in to change notification settings - Fork 42
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
Kelly #10
base: master
Are you sure you want to change the base?
Kelly #10
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.
Overall nice work, you hit the learning goals here. Take a look at my comments and let me know where you have questions.
end | ||
|
||
def dequeue | ||
raise NotImplementedError, "Not yet implemented" | ||
removed = @store[@front] |
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.
👍
end | ||
|
||
def size | ||
raise NotImplementedError, "Not yet implemented" | ||
return @store.size |
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.
This tells you the size of the internal array, not the size of the queue.
end | ||
|
||
def to_s | ||
return @store.to_s | ||
store_string = [] | ||
@store.each do |num| |
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.
This should start with the front and traverse the array until the rear, including wrapping around the array if needed.
Stacks and Queues
Thanks for doing some brain yoga. You are now submitting this assignment!
Comprehension Questions
OPTIONAL JobSimulation