Driver Code
public static void main ( String [ ] args ) { int A [ ] = { 1 , 2 , 3 , 5 , 8 } ; int n = A . length ; int [ ] [ ] q = { { 1 , 0 , 2 } , { 2 , 5 } , { 1 , 3 , 5 } } ; performQueries ( A , n , q ) ; } }