Modification of bubbleSort()
Altered to use swapped flag for breaking main loop.
setRange() to end function.