Changed inner loop on bubble sort implementations so that they do not needlessly compare the last item to an undefined value when i is 0