array : Kth smallest element in a row-wise and column-wise