java.lang.ObjectBubbleSorter
public class BubbleSorter
Sort an array of integers using bubble sort
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 |
---|
public BubbleSorter()
Method Detail |
---|
public int[] sort(int[] arr, int left, int right)
arr
- the array to sortleft
- the left index for sortingright
- the right index for sorting (exclusive)