They looked out of place in godoc.
Includes documenting sort stability.
Fixes #3356
R=golang-dev, gri, trolleriprofessorn
CC=golang-dev
https://golang.org/cl/
5855044
}
}
+// Sort sorts data.
+// The algorithm used is not guaranteed to be a stable sort.
func Sort(data Interface) {
// Switch to heapsort if depth of 2*ceil(lg(n)) is reached.
n := data.Len()
quickSort(data, 0, n, maxDepth)
}
+// IsSorted reports whether data is sorted.
func IsSorted(data Interface) bool {
n := data.Len()
for i := n - 1; i > 0; i-- {