This is a creation in Article, where the information may have evolved or changed.
The principle of quick sorting is not introduced. See an interesting video on the web and you can look at it, very detailed and interesting.
Quick Sort Videos
Code: HTTPS://PLAY.GOLANG.ORG/P/FW5GTZRPJ0
Package Mainimport ("FMT") func main () {var sortarray = []int{3, $, 3, 3, A, a, a, a, a, A/V} f Mt. Println (Sortarray) qsort (sortarray, 0, Len (sortarray)-1) fmt. Println (Sortarray)}func qsort (array []int, low, high int) {if low < high {m: = partition (array, low, high) Fmt. Println (m) qsort (array, Low, m-1) qsort (array, m+1, high)}}func partition (array []int, low, high int) in t {key: = Array[low] Tmplow: = Low Tmphigh: = high for {//finds an element less than or equal to key, the position of the element must be between Tmplow and high because the array [Tmplow] and left element less than or equal to key, will not cross for Array[tmphigh] > key {tmphigh--}//Find an element greater than key, the position of the element must be Low to tmphigh+1. Because array[tmphigh+1] must be greater than key for Array[tmplow] <= key && Tmplow < Tmphigh {tmplow++} If Tmplow >= tmphigh {break}//Swap (Array[tmplow], Array[tmphigh]) array[tmp Low], Array[tmphigh] = Array[tmphigh], array[tMplow] FMT. Println (Array)} Array[tmplow], array[low] = Array[low], Array[tmplow] return Tmplow}