You are given an array of integers. Your task is to implement the selection sort algorithm to sort the array in non-decreasing order.
nums = [5, 2, 9, 4, 7] [2, 4, 5, 7, 9]
Last updated 1 year ago