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

Added Stack iteration quick sort for visualization. #9

Closed
wants to merge 1 commit into from

Conversation

thetornadotitan
Copy link

@thetornadotitan thetornadotitan commented Dec 4, 2018

Hello Dan,

I have implemented a visualization for quick sort using the stack object to handle the recursive calls iteratively.

The main issue with trying to visualize quickdraw is that it uses recursion and you have to break that recursion into an iterative process so you can view each step in the iteration.

Using the Stack object allows this. You'll see in a comment in the code that this was not my design or finding but rather I found someone who cleverly broke the recursion and used that as a basis.

Originally I made the quicksort to be used in continuation of the pixel sorting video you did. However, I saw the visualisation video and decided to help there as well.

Hopefully, this is useful.

Thank for your time!

@thetornadotitan
Copy link
Author

Forgive me if I have broken any formalities with git, this is my first commit to something that is not my own. :)

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

Successfully merging this pull request may close these issues.

1 participant