APPROX2 - Editorial

thanks fr your help guys…

Nice .
Btw did you try to submit this one ?

low is 10*10 not 10**9.
And it hits a TLE in the second subtask, even though the same thing in c++ gets through.

@aayush yes it is working

@aayush just submitted

is this work O(nlogn) in count solns for following test-
1
10 8
4 4 4 4 4 4 4 4 4 4

@joney for each of test case it is O(nlog(n))

1 Like

O notation implies worst case for any type of the test case

if you have any doubts regarding this post the ask i will try to clear your doubt

@ma5termind
Please answer my dout

Could you please help me out with why the second if condition was necessary ?

why is it cakewalk? it is so hard