Bijak interview question

Return all unique triplets having a sum S.