Consider current pair and find if there is an element in a1 [ ] such that these three form a required triplet
if sum - a2 [ i ] - a3 [ j ] in s : NEW_LINE INDENT return True NEW_LINE DEDENT return False NEW_LINE