Skip to content

Conversation

ML-Chen
Copy link

@ML-Chen ML-Chen commented Oct 19, 2019

Here are some suggestions I have for the wording of sort_stack_challenge.ipynb and sort_stack_solution.ipynb, to reflect the actual code and test cases more accurately:

  • Based on the code and the test cases, the output given an empty stack should be another empty stack, not None
  • Buffer stores elements in sorted order, with largest element at top, not reverse sorted order with smallest element at top. Otherwise, how could we return buffer as our answer when the output should have the largest element at the top?
  • While buffer is not empty and buffer top is > than temp (not or)
  • Clarify that the top element is not just copied to a temp variable, but rather popped off into the temp variable. This happens within the while loop, not before.

#264

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

Successfully merging this pull request may close these issues.

2 participants