Given a list of integers with no duplicates, find out how many swaps it will take to sort the list in increasing order using Bubble sort.

First line of each test case will contain an integer T = number of test cases. Each test case will contain two lines. First line will contain a number N = no. of elements in the list. Next line will contain N space separated numbers. 1 <= N <= 50.

For each test case, print on a single line, number of swaps required to sort the list in increasing order using Bubble sort.

3 5 2 1 4 6 3 10 123 21 34 45 25 675 23 44 55 900 1 23

3 16 0

1) You should implement variation of bubble sort in which, the largest element should bubble towards right in each pass over the list.