Change in the input array/list itself.
Input:
N = 5
arr = {8, 6, 2, 5, 1}
Output:
1 2 5 6 8
Explanation:

First line contains an integer 'N' representing the size of the array/list.
Second line contains 'N' single space separated integers representing the elements in the array/list.
The output contains the integers of the sorted array, separated by a single space.
You don’t need to print anything. Just implement the given function.
The selection sort algorithm works by repeatedly selecting the smallest element from the unsorted part of the array and moving it to the beginning of the unsorted part. This process is done iteratively until the entire array is sorted.
Here is the step-by-step approach for selection sort:
function selectionSort(arr):