You are given an array of n unsigned 8-bit integers (uint8_t). Your task is to:
Do not use any built-in sort functions. Use only loops and comparisons.Example-1
Input: n = 5, arr = [10 3 5 2 7] Output: 10 7 5 3 2
Example-2
Input: n = 3, arr = [0 128 255] Output: 255 128 0
Example-3
Input: n = 1, arr = [42] Output: 42
Test Cases
Test Results
Input
5 10 3 5 2 7
Expected Output
10 7 5 3 2