DAYS
HOUR
MINS
SEC
Error
Given an Integer N and a list arr. Sort the array using bubble sort algorithm.
Example 1:
Input:
N = 5
arr[] = {4, 1, 3, 9, 7}
Output:
1 3 4 7 9
Example 2:
Input:
N = 10
arr[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}
Output:
1 2 3 4 5 6 7 8 9 10
Constraints:
1 <= N <= 103
1 <= arr[i] <= 103
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Yes