Question: You have been given an array A of size N . you need to sort this array non-decreasing order using bubble sort. However, you do not need to print the sorted array . You just need to print the number of swaps required to sort this array using bubble sort
Input Format
The first line consists of a single integer N denoting size of the array. The next line contains N space separated integers denoting the elements of the array.
Output Format Print the required answer in a single line
Constrains 1 <= N <= 100 1 <= a[i] <= 100
My Solution which returns nothing
def bubbleSort(arr, arrSize):temp = 0swap = 0for i in range(arrSize):for e in range(arrSize-i-1):if arr[e] < arr[e + 1]:temp = arr[e + 1]arr[e] = tempswap += 1return swap