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

Small phrasing fix #33

Closed
rafadaguiar opened this issue Aug 14, 2015 · 1 comment
Closed

Small phrasing fix #33

rafadaguiar opened this issue Aug 14, 2015 · 1 comment
Labels

Comments

@rafadaguiar
Copy link

In /stacks_queues/sort_stack/sort_stack_solution.ipynb there's a small phrasing issue on the line:
"While buffer is empty or buffer top is > than temp\n".

It should be "While buffer is not empty or buffer top is > than temp\n" as implied in the code below:

class MyStack(Stack):

    def sort(self):
        buff = MyStack()
        while not self.is_empty():
            temp = self.pop()
            while not buff.is_empty() and buff.peek() > temp:
                self.push(buff.pop())
            buff.push(temp)
        return buff
@donnemartin
Copy link
Owner

Hi Rafael,

Good catch, would you like to submit a PR? Otherwise I'm happy to fix it.

-Donne

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants