Driver code
var pairs = [ ] ; pairs . push ( [ 1 , 3 ] ) ; pairs . push ( [ 2 , 4 ] ) ; pairs . push ( [ 3 , 5 ] ) ; pairs . push ( [ 7 , 10 ] ) ; var n = pairs . length , k = 3 ; if ( kOverlap ( pairs , k ) ) document . write ( " " ) ; else document . write ( " " ) ;