InsertionSort

com.phasmidsoftware.sort.InsertionSort
object InsertionSort extends Sort

Simple implementation of insertion sort.

Works for small arrays but due to quadratic complexity is not generally good, unless array is partially sorted.

Attributes

Graph
Supertypes
trait Sort
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

final def sort[A : Ordering : ClassTag](data: Array[A]): Unit
final def sort[A : Ordering](data: Array[A], start: Int, end: Int): Unit