Driver code
var matrix = [ [ 1 , 3 , 5 , 7 ] , [ 10 , 11 , 16 , 20 ] , [ 23 , 30 , 34 , 50 ] ] ; var K = 3 ; if ( searchMatrix ( matrix , K ) ) document . write ( " " ) ; else document . write ( " " ) ;