Skip to content

Latest commit

 

History

History
25 lines (24 loc) · 1.23 KB

README.md

File metadata and controls

25 lines (24 loc) · 1.23 KB

Sorting Algorithm Visualizer

This is a Python program which visualizes the sorting process for many various sorting algorithms. I've also implemented the max heap data structure in order to include heap sort.

Note:

I programmed these algorithms when I was young and naive, and hadn't yet taken an actual data structures and algorithms class. Eventually, I learned some ways that we could optimize these sorts, and am planning to apply those optimizations later. For example, heap sort can be done in-place(so, there would be no need for the separate heap structure). Another optimization would be, for quick sort, picking the median of three random elements as the pivot instead of blindly picking the first element of each partitioned piece to be the pivot(the in-practice case asymptotic upper bound would still be O(nlogn), but the actual runtime is faster than regular quick sort's runtime).

The sorting algorithms included are:

O(nlogn) sorts:

Quick sort

Merge sort

Heap sort

O(n^2) sorts:

Bubble sort

Insertion sort

Selection sort

O(Infinity??)

BOGO SORT(the best one! :( not really)