hacktoberfest
hacktoberfest copied to clipboard
Bubble sort
add bubble sort
Hello, this is my first PR please assign this to me
Hello Srujan Rao, can i submit a PR on this issue ?
``from sys import stdin
def bubbleSort(arr, n) : for i in range(n-1): for j in range(n-i-1): if arr[j]> arr[j+1]: temp = arr[j] arr[j]= arr[j+1] arr[j+1] = temp
#Taking Input Using Fast I/O def takeInput() : n = int(stdin.readline().strip()) if n == 0 : return list(), 0
arr = list(map(int, stdin.readline().strip().split(" ")))
return arr, n
#to print the array/list def printList(arr, n) : for i in range(n) : print(arr[i], end = " ") print()
#main t = int(stdin.readline().strip())
while t > 0 :
arr, n = takeInput()
bubbleSort(arr, n)
printList(arr, n)
t-= 1
add bubble sort
I am submitting a code of bubble sort in python. I hope it is ok
hey there can i add bubble sort in python solution?
please assign it to me