adding a optimized bubble sort algorithm which runs better on arrays which are closer to sorting