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 log^{2} N)

1 Like

Though it depends on test cases too, as stated before youâ€™ll be good in (NlogN).