TLE in 2nd test case

hello @rastogi.g1998
use randomised quicksort , to pass all test cases

Can we do by reshuffling the given array and then applying usual quick sort?

yeah u can do that …