# Bidirectional Bubble Sort Program in Python | Java | C | C++ size=int(input("Enter the size of the array:"));arr=[]print("Enter the element of the array:");for i in range(0,size):    num = int(input())    arr.append(num)print("Before Sorting Array Element are: ",arr)low = 0high= size-1while low < high:    for inn in range(low, high):        if arr[inn] > arr[inn+1]:            temp=arr[inn]            arr[inn]=arr[inn+1]            arr[inn+1]=temp    high-=1    for inn in range(high,low,-1):        if arr[inn] < arr[inn-1]:            temp=arr[inn]            arr[inn]=arr[inn-1]            arr[inn-1]=templow+=1print("\nAfter Sorting Array Element are: ",arr)