Attentive AI interview question

Three Sum Problem Generating a random Function with Some special requirements