The algorithm i need first finds the smallest element of theArray and exchanges it with the element indexed by 0, and then finds the second smallest element of theArray and exchanges it with the element indexed by 1. The algorithms continues in this matter for n − 1 times before it finishes. The algorithm finally takes theArray and n as inputs, and doesn’t return a value.