Introduction to Exchange Sort Algorithm
Exchange sort is an algorithm used to sort in ascending as well as descending order. It compares the first element with every element if any element seems out of order it swaps. Example: Input: arr[] = {5, 1, 4, 2, 8}Output: {1, 2, 4, 5, 8}Explanation: Working of exchange sort: 1st Pass: Exchange so