Driver code
int main ( ) { int interval [ ] [ 2 ] = { { 1 , 4 } , { 4 , 5 } , { 5 , 6 } , { 6 , 7 } , { 3 , 5 } } ; int N = sizeof ( interval ) / sizeof ( interval [ 0 ] ) ; int Q = 7 ; solve ( interval , N , Q ) ; return 0 ; }