← Goldman Sachs questions
CodingReported in a candidate post, Jul 2025

Print all triplets with a given sum

Filed under Goldman Sachs

Given an integer array and a target sum, print (return) every unique triplet of elements whose sum equals the target. Triplets that use the same values in a different order count as one.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Goldman Sachs questions

Collected from public candidate posts and coding forums. Updated Nov 2026.