Demo entry 6642421

quicksort

   

Submitted by anonymous on Sep 23, 2017 at 11:50
Language: Go. Code size: 226 Bytes.

var semaphore = make(chan struct{}, 100)

func QuickSortSequential(a *[]int, low, hi int) {
	if hi < low {
		return
	}

	p := partition(a, low, hi)
	QuickSortSequential(a, low, p-1)
	QuickSortSequential(a, p+1, hi)
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).