Class SelectionSorter

java.lang.Object
  extended by SelectionSorter

public class SelectionSorter
extends java.lang.Object

Sort an array of integers using selection sort

Version:
July 2003
Author:
Todd A. Whittaker

Constructor Summary
SelectionSorter()
           
 
Method Summary
 int[] sort(int[] arr, int left, int right)
          Sort an array between left and right indices using selection sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionSorter

public SelectionSorter()
Method Detail

sort

public int[] sort(int[] arr,
                  int left,
                  int right)
Sort an array between left and right indices using selection sort

Parameters:
arr - the array to sort
left - the left index for sorting
right - the right index for sorting (exclusive)
Returns:
the sorted array