Problem Statment
Given a N x N matrix, where every row and column is sorted in non-decreasing order. Find the kth smallest element in the matrix.
Example 1:
N = 4
mat[][] = {
{10, 20, 30, 40}
{15, 25, 35, 45}
{24, 29, 37, 48}
{32, 33, 39, 50}
}
K = 7
>>Output: 30
Explanation: 30 is the 7th smallest element.