This project implements various sorting algorithms in Go. It includes implementations of common sorting algorithms such as Merge Sort, Quick Sort, Heap Sort, and more. The project also includes benchmark tests to compare the performance of these algorithms.
- Merge Sort: An efficient, stable, comparison-based, divide and conquer sorting algorithm.
- Quick Sort: A highly efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order.
- Heap Sort: A comparison-based sorting technique based on a binary heap data structure.
- Insertion Sort: A simple sorting algorithm that builds the final sorted array one item at a time.
- Selection Sort: An in-place comparison sorting algorithm.
- Shell Sort: An in-place comparison sort that generalizes insertion sort to allow the exchange of items that are far apart.
- Bucket Sort: A distribution sort that works by distributing the elements into a number of buckets.
- Radix Sort: A non-comparative integer sorting algorithm.
- Bogo Sort: A highly ineffective sorting algorithm based on the generate and test paradigm.
- Bubble Sort: A simple comparison-based sorting algorithm.
- Sleep Sort: A humorous and inefficient sorting algorithm.
The project includes benchmark tests to measure the performance of each sorting algorithm. These benchmarks can be run using the Go testing framework.
To run the benchmarks:
go test -bench . -benchmem