# Sort

Given an array of positive integers , you need to restructure this array into an increasing one .

You can select any number , and place it in any other position of the array . The value of this operation , is the number selected .

For example ,

Given A = { 2 , 7 , 5 }

we select 5 and place it in between 2 and 7 . Value of operation = 5 .

Array now , A = { 2 , 5 , 7 }

You need to sort it in the minimal possible way .

**INPUT SPECIFICATIONS**

First line contains the number of test cases , T .

The next T test cases , consists of 2 lines each , N = Total elements in the array

The next line contains N positive integers .

**OUTPUT SPECIFICATIONS**

Single integer , Minimum possible way to sort this array .

**INPUT**

```
```

2

3

2 7 5

4

7 1 2 3

**OUTPUT**

```
```

5

6

**CONSTRAINTS**

T < 100

N <= 1000

Array element <= 1000

**Problem Setter :**

*Akshit Poddar*

**Problem Tester :**

*Arjun Singh Bhatia*

**Languages:**Brain,C,C++,Java,Pascal,Perl,PHP,Python,Ruby,Text