Consider the following sort method.

```
public static void sorter( double[] nums )
{
for(int i=0; i< nums.length-1; i++)
{
int curr = i;
for(int j = i+1; j< nums.length; j++)
{
if(nums[j] < nums[curr])
curr = j;
}
if( curr != i)
{
double tempNum = nums[curr];
nums[curr] = nums[i];
nums[i] = tempNum;
}
}
}
```

What type of sort algorithm is this method using and how many passes through the outside for loop will it take to sort the following array?

```
double[] nums = {40.0, 20.3, 5.4, 50.1, 10.8};
sorter(nums);
```