The first line contains a single integer ‘T’ representing the number of test cases.
The first line of each test case will contain two integers ‘N’ and ‘M’ denoting the number of rows and columns, respectively.
Next ‘N’ lines contain ‘M’ space-separated integers each denoting the elements in the matrix.
For each test case, print an integer which is the overall median of the given matrix.
Output for every test case will be printed in a separate line.
You don’t need to print anything; It has already been taken care of. Just implement the given function.
1 <= 'T' <= 50
1 <= 'N' , 'M' <= 100
1 <= 'MATRIX'['I']['J'] <= 10 ^ 5
'N' * 'M' is always an odd number.
Where 'MATRIX'['I']['J'] denotes the value at ('I', 'J')th cell in the matrix.
Time limit: 1 sec
Merge Two Sorted Arrays Without Extra Space
Search In A Sorted 2D Matrix
Spiral Matrix
Sort 0s, 1s, 2s
Fake Coin Problem