Driver Code
public static void main ( String [ ] args ) { int a [ ] = { 7 , 2 , 3 , 0 , 5 , 10 , 3 , 12 , 18 } ; int n = a . length ; Query q [ ] = { new Query ( 0 , 4 ) , new Query ( 4 , 7 ) , new Query ( 7 , 8 ) } ; int m = q . length ; RMQ ( a , n , q , m ) ; } }