Skip to content

Sort insertion

admin edited this page Jun 11, 2021 · 3 revisions

Sort insertion

Intro

Go License Website dta.agency GitHub release

Input : []int {5, 6, 2, 4, 3, 1}

import "github.com/digital-technology-agency/math/pkg/sort"

func Example() {
    input := []int {5, 6, 2, 4, 3, 1}
    result := sort.Insertion(input)
	fmt.Printf("Result: %v", value)
    /*
        Result: [] {1, 2, 3, 4, 5, 6}    
    */ 
}
Clone this wiki locally