The function returns true if there exist three elements in AP Assumption : set [ 0. . n - 1 ] is sorted . The code strictly implements the algorithm provided in the reference .
def arithematicThree ( set_ , n ) : NEW_LINE