My code is at the link https://ide.codingblocks.com/s/238638. The constraints are test cases<=10 and size of array(n)<=100000 and the time complexity is O(N log N). I could not understand why I am getting TLE in this code. Please someone tell me where I am wrong in this code. What I can do to avoid TLE.