Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT A = [ 1 , 2 , 3 , 5 , 8 ] NEW_LINE n = len ( A ) NEW_LINE q = [ [ 1 , 0 , 2 ] , [ 2 , 5 , 0 ] , [ 1 , 3 , 5 ] ] NEW_LINE performQueries ( A , n , q ) NEW_LINE DEDENT