Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ [ 1 , 4 ] , [ 4 , 4 ] , [ 2 , 2 ] , [ 3 , 4 ] , [ 1 , 1 ] ] NEW_LINE N = len ( arr ) NEW_LINE print ( maxRanges ( arr , N ) ) NEW_LINE DEDENT