Driver code
static void Main ( ) { int [ ] arr = { 2 , 3 , 6 , 7 , 4 , 5 , 30 } ; int [ ] queries = { 6 , 5 } ; int N = arr . Length ; int M = queries . Length ; calculateQuery ( arr , N , queries , M ) ; } }