how to find median in row data
Answers
Answered by
1
Answer:
First, we find the minimum and maximum elements in the matrix. ...
Then we use binary search on our range of numbers from minimum to maximum, we find the mid of the min and max and get a count of numbers less than our mid. ...
For a number to be median, there should be (r*c)/2 numbers smaller than that number
Similar questions