Trimble Interview Question

Asked to write psedo code for 3sum, triplet