Skip to content

dark0ghost/merge_sort

Repository files navigation

Merge sort on go with gorutin

Go CodeQL gobenchdata publish

About

Golang program for implementation of Merge Sort with gorutin

Use

type Int int

func (v Int) Compare(value interface{}) bool{
	return v < value.(Int)
}

func toCompareArray(array []int) (buffer []cre.Compare){
        buffer = []cre.Compare{}
	for _, i := range array {
		buffer = append(buffer, Int(i))
	}
	return
}

func main(){
        var test []cre.Compare
	test := toCompareArray([]int{1,3,9,6,34,21,12})
	value, err := MergeSort(test)
	if err != nil{
		// chechk error
	}
	// you operation
	return
}