You are given an array of n unsigned 8-bit integers (uint8_t). Your task is to:
Do not use any standard library sort functions.
Use only loop and comparison logic (firmware-safe implementation).
Example-1
Input: n = 5, arr = [10 3 5 2 7]
Output: 2 3 5 7 10
Example-2
Input: n = 3, arr = [255 0 128]
Output: 0 128 255
Example-3
Input: n = 1, arr = [42]
Output: 42
Input
5 10 3 5 2 7
Expected Output
2 3 5 7 10