Driver code
public static void main ( String args [ ] ) { int matrix [ ] [ ] = { { 1 , 3 , 5 , 7 } , { 10 , 11 , 16 , 20 } , { 23 , 30 , 34 , 50 } } ; int K = 3 ; if ( searchMatrix ( matrix , K ) ) { System . out . println ( " Found " ) ; } else { System . out . println ( " Not ▁ found " ) ; } } }