
# arr = [1,2,4,3]
# for i in range(len(arr)):
#     swapped = False
#     for j in range(len(arr)-1):
#         if arr[j]>arr[j+1]:
#             arr[j],arr[j+1] = arr[j+1],arr[j]
#             swapped = True
#     if swapped == False:
#         break
# print(arr)