Function to search an element in a matrix based on Divide and conquer approach
function searchMatrix ( matrix , K ) { var low = 0 ; var high = M - 1 ; while ( low <= high ) { var mid = low + parseInt ( ( high - low ) / 2 ) ;