Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT R = 5 NEW_LINE arr = [ [ 1 , 2 ] , [ 2 , 3 ] , [ 4 , 5 ] ] ; NEW_LINE queries = [ 2 , 4 , 1 , 3 ] NEW_LINE N = len ( arr ) NEW_LINE M = len ( queries ) NEW_LINE findMaxValueOfSet ( arr , queries , R , N , M ) NEW_LINE DEDENT