Documentation ¶
Index ¶
- func BubbleSort(c ds.Comparables) ds.Comparables
- func HeapSort(c ds.Comparables) ds.Comparables
- func InsertionSort(c ds.Comparables) ds.Comparables
- func MergeSort(c ds.Comparables) ds.Comparables
- func QuickSort(c ds.Comparables) ds.Comparables
- func SelectionSort(c ds.Comparables) ds.Comparables
- func ShellSort(c ds.Comparables, interval int) ds.Comparables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BubbleSort ¶
func BubbleSort(c ds.Comparables) ds.Comparables
BubbleSort sorts the given []Comparable by bubble sort algorithm. Time complexity O(n^2) Space complexity O(1)
func HeapSort ¶
func HeapSort(c ds.Comparables) ds.Comparables
HeapSort sorts the given []Comparable by heap sort algorithm. Time complexity O(nlogn) Space complexity O(1)
func InsertionSort ¶
func InsertionSort(c ds.Comparables) ds.Comparables
InsertionSort sorts the given []Comparable by insertion sort algorithm. Time complexity O(n^2) Space complexity O(1)
func MergeSort ¶
func MergeSort(c ds.Comparables) ds.Comparables
MergeSort sorts the given []Comparable by merge sort algorithm. Time complexity O(nlogn) Space complexity O(1)
func QuickSort ¶
func QuickSort(c ds.Comparables) ds.Comparables
QuickSort sorts the given []Comparable by quick sort algorithm. Time complexity O(nlogn) Space complexity O(n)
func SelectionSort ¶
func SelectionSort(c ds.Comparables) ds.Comparables
SelectionSort sorts the given []Comparable by selection sort algorithm. Time complexity O(n^2) Space complexity O(1)
func ShellSort ¶
func ShellSort(c ds.Comparables, interval int) ds.Comparables
ShellSort sorts the given []Comparable by shell sort algorithm. Time complexity O(n^1.3) Space complexity O(1)
Types ¶
This section is empty.