hcp-uw/algo-visualizer

Implement more sorting algorithms

Closed this issue · 0 comments

We currently have bubble, insertion, and selection sort implemented. We could also implement other popular sorting algorithms, such as

  • Mergesort
  • Quicksort
  • Radix sort
  • Bucket sort
  • Heap sort

among others. We can reference existing sorting algorithms for ideas on how to implement these. Additionally, we may need to consider additional visual aspects for

  • Mergesort and quicksort, as they rely on recursion. We could consider displaying a tree that outlines the divide-and-conquer approach
  • Bucket and radix sort both make use of "buckets" that represent a range of values and determines where an element should go. We could consider displaying visual buckets labeled with the range they represent and animate an element being put into the appropriate bucket
  • Heap sort uses a heap and continuously removes the root to build up a sorted array. We could consider implementing a visual of the heap and animate the elements being removed from the heap and being added into the resulting array