C++
Given an array of integers, sort the array inascending/descending order by using bubble sortalgorithm.
Reference:http://www.algolist.net/Algorithms/Sorting/Bubble_sort
Write a program to accept 3 parameters, an array A ofintegers, size of the array N and sorting order O (0 or1).
Note: 0 represents ascending order. 1 represents descending order.
Input 0 9 4 3 6 8 9 2 1 5 7
Where,
Output 1 2 3 4 5 6 7 8 9
C++ Given an array of integers, sort the array in ascending/descending order by using bubble sort algorithm. Reference:
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am