Driver code
public static void main ( String [ ] args ) { int arr [ ] = { 2 , 7 , 4 , 5 , 3 } ; int n = arr . length ; int q [ ] = { 3 , 4 , 12 , 6 } ; int m = q . length ; solveQueries ( arr , n , q , m ) ; } }