bubble_sort without memcpy