Class BubbleSorter

java.lang.Object
  extended by BubbleSorter

public class BubbleSorter
extends java.lang.Object

Sort an array of integers using bubble sort

Version:
July 2003
Author:
Todd A. Whittaker

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

Constructor Detail

BubbleSorter

public BubbleSorter()
Method Detail

sort

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

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