


The first line of input contains a single integer T, representing the number of test cases or queries to be run, then the T test cases follow.
The first line of each test case contains a positive integer 'N' which represents the number of gas stations.
The second line of each test case contains 'N' space-separated integers representing the integer array 'gas'.
The third line of each test case contains 'N' space-separated integers representing the integer array 'cost'.
For each test case, print a single integer denoting the minimum index of the starting gas station if you are able to travel around the cycle once, otherwise print -1.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <=50
1 <= N <= 10 ^ 4
0 <= GAS[i] <= 10 ^ 5
0 <= COST[i] <= 10 ^ 5
Where GAS[i] represents the ith element of 'GAS' array,
COST[i] represents the ith element of 'COST' array.
Time Limit: 1 sec
You can notice that If the car starts at station ‘A’ and the first station it cannot reach is station ‘B’, it means any station between A and B can not reach B. We can use it to solve the problem in linear time.
Pair Product Div by K
Pair Product Div by K
Merge Two Sorted Arrays Without Extra Space
Merge Two Sorted Arrays Without Extra Space
Co-Prime
First Digit One
Special Digit Numbers