1.You are given an array of N Integrs. 2.You have to complete the function bubble() that should sort the array in bubble fashion.
Input Format
1.First line contains an Integer 'N'. 2.Second line contains N space separated elements of the array.
Output Format
Print the sorted array.
Constraints
1 <=N<= 10^3 1 <=arr[i]<= 10^3
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
5 4 1 3 9 7
Output
1 3 4 7 9