mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-09 10:58:02 +00:00
Merge pull request #34 from rafadaguiar/master
Tweaked stack sort algorithm discussion.
This commit is contained in:
@@ -62,7 +62,7 @@
|
|||||||
"* Our buffer will hold elements in reverse sorted order, smallest at the top\n",
|
"* Our buffer will hold elements in reverse sorted order, smallest at the top\n",
|
||||||
"* Store the current top element in a temp variable\n",
|
"* Store the current top element in a temp variable\n",
|
||||||
"* While stack is not empty\n",
|
"* While stack is not empty\n",
|
||||||
" * While buffer is empty or buffer top is > than temp\n",
|
" * While buffer is not empty or buffer top is > than temp\n",
|
||||||
" * Move buffer top to stack\n",
|
" * Move buffer top to stack\n",
|
||||||
" * Move temp to top of buffer\n",
|
" * Move temp to top of buffer\n",
|
||||||
"* Return buffer\n",
|
"* Return buffer\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user