Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
1,204 views
in Online Assessments by Expert (32,020 points) | 1,204 views

1 Answer

0 like 0 dislike

image
image
image
image

 

Constraints::
1<=T<=10 (T-> Number of Test cases)
1<=N<=10^5
1<=L[i],R[i]<=10^5
1<=M<=10^5
0<=M[i]<=10^5

 

P.S: According to given constraints expecting solution O(nlogn) or O(n).
(Wrote O(n^2) solution, got TLE)

by Expert (32,020 points)