Given a 2D array with rows sorted in ascending order. Find the median of the whole 2D array.
For example,
Given a 2D array with rows sorted in ascending order. Find the median of the whole 2D array.
For example,
Given an array of integer. Find the kth smallest element in the array in a most efficient manner.
For example: A = [2, 1, 0, 3, -1, 3] and k=3 then the 3rd smallest element is 1. This is also (6-3) = 3rd largest element.
Given that integers are read from a data stream. Find median of elements read so for in efficient way.
For example, median of the stream, A = [1, 5, 3, 2, 6, 2, 3] is = 3.