This is one of the fastest way to sort a completely random list in scratch! Feel free to use if you want. The render block is unnecessary in the QuickSort Block so take it out to speed it up. UPDATE NEED!!! performs terrible on already sorted lists! and reverse ordered lists!
Feel free to use if you want. The render block is unnecessary in the QuickSort Block so take it out to speed it up. It runs very fast for scratch 7000 random elements sorted in 1 second! Also I need to add a small optimization when there are only 4 elements in a partition it is more efficient to use another sorting algorithm other than quicksort. If you are going to use please give me credit. The algorithm used can be explained here <http://en.wikipedia.org/wiki/Quicksort> However my implementation has a few differences and is not fully optimized mostly due to the way blocks work in scratch. The way I decide to do recursion was to actually make the call stack myself. There probably are a few other ways to do this that maybe a little bit more efficient. However for all practical scratch applications I believe this is the most effective.