Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT arr = [ 2 , 7 , 4 , 5 , 3 ] NEW_LINE n = len ( arr ) NEW_LINE q = [ 3 , 4 , 12 , 6 ] NEW_LINE m = len ( q ) NEW_LINE solveQueries ( arr , n , q , m ) NEW_LINE DEDENT