7

4.5

2 votes
Problem

7.Find out the absolute difference between comparisons and swaps in the insertion sort.

Input Format

1.Number of test case

2.an integer n denoting size of array

3.n integers

Output Format

Single positive integer denoting the absolute difference

1<=T<=10 1<=n<=100000 1<=a[i]<=1000000000

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?