What is the maximum time complexity that can get your submission accepted for time limit of 2sec when N=100000.
O(NlogN)
It also depends on the number of testcases.
1 Like
The most is O(x\sqrt{x}) or O(N log2 N)
1 Like
Though it depends on test cases too, as stated before you’ll be good in (NlogN).