Class Sort

java.lang.Object
  extended by Sort

public class Sort
extends java.lang.Object

A collection of sorting algorithms for arrays of integers.

Version:
2004-10-29
Author:
Stefan Nilsson

Constructor Summary
Sort()
          Default constructor.
 
Method Summary
 void selectionSort(int[] v)
          Sort the elements in ascending order using selection sort.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sort

public Sort()
Default constructor.

Method Detail

selectionSort

public void selectionSort(int[] v)
Sort the elements in ascending order using selection sort. This algorithm has time complexity Theta(n*n), where n is the length of the array.

Parameters:
v - An array of integers.