Skip to content

go-sort: 11 sorting algorithms implemented in Go; 基于Go实现的11种排序算法

License

Notifications You must be signed in to change notification settings

Harris-H/go-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Sort Algorithms

Go-Sort

1 Introduction

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.

2 Features

  • 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.

3 Benchmark

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

Benchmark

About

go-sort: 11 sorting algorithms implemented in Go; 基于Go实现的11种排序算法

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages