The first line of input contains an integer ‘T’ denoting the number of test cases. The next 2*T represents the ‘T’ test cases. The first line of each test case contains an integer ‘n’ denoting the number of intervals. The next ‘n’ lines of each test case contain two space-separated non-negative integers denoting the starting and end of an interval respectively.
For each test case, return the size of the maximal set of mutually disjoint sets.
You do not need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 50 1 <= n <= 10^4 1 <= a < b <= 10^9 Where ‘T’ is the total number of test cases, ‘n’ is the number of intervals and ‘a’, ‘b’ are the starting and ending of an interval. Time Limit: 1 sec
Search In A Sorted 2D Matrix
Ninja And The Strictly Increasing Array