sort

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 0 Imported by: 0

README

Merge sort

Build Status codecov Go Report Card

Merge sort algorithm implementation

Usage

import "github.com/vehsamrak/merge-sort"

unsortedList := []int{3,2,1}
sorter := &sort.MergeSorter{}
sortedList := sorter.Sort(unsortedList)

// sortedList would be: [1, 2, 3]

Tests

go test ./...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MergeSorter

type MergeSorter struct {
}

MergeSorter can sort elements using "merge sort" algorithm

func (*MergeSorter) Sort

func (sorter *MergeSorter) Sort(unsortedElements []int) (sortedElements []int)

Sort uses "merge sort" algorithm to sort integers using recursion

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL