All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----jdsl.core.algo.sorts.ArrayBubbleSort
public ArrayBubbleSort()
public void sort(Sequence S, Comparator c)
'i' is an index indicating the beginning of the sorted part of the sequence, which lets the inner loop break when no more swaps will take place. In the inner loop, elements bubble up, with the maximum taking its place at the tail of the unsorted part of the sequence.
All Packages Class Hierarchy This Package Previous Next Index