// InsertionSort implements Insertion Sort in-place
InsertionSort implements Insertion Sort in-place
// InsertionSort implements Insertion Sort in - place
func InsertionSort(in myInterface) {
	if in.Len() <= 1 {
		return
	}
	for i := 1; i < in.Len(); i++ {
		j := i - 1
		for ; j >= 0; j-- {
			if in.Less(j+1, j) { 
				in.Swap(j, j+1) 
			} else {
				break
			}
		}
	}
}
func InsertionSort ( in myInterface ) { if in . Len ( ) <= 1 { return } for i := 1 ; i < in . Len ( ) ; i ++ { j := i - 1 for ; j >= 0 ; j -- { if in . Less ( j + 1 , j ) { in . Swap ( j , j + 1 ) } else { break } } } }
InsertionSort implements Insertion Sort in-place
InsertionSort implements Insertion Sort in - place
// sort in-place // insert in[i] into sorted in[0] ~ in[i-1] // compare from i-1 to 0 //Less() //Swap()