Driver code
var a = [ [ 1 , 3 ] , [ 4 , 7 ] , [ 8 , 11 ] ] ; var n = a . length ; var k = 6 ; var index = findNumber ( a , n , k ) ; if ( index != - 1 ) document . write ( index ) ; else document . write ( - 1 ) ;