Search
⌘K

Leetcode 15. 3Sum

Find all unique triplets in an integer array that sum to zero, ensuring no duplicate triplets in the output. The core challenge is efficiently enumerating combinations (commonly done by sorting and using a two-pointer scan) within the 3 ≤ n ≤ 3000 constraint.

Asked at:

Stripe

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late January, 2026

Stripe

Intern

Early November, 2024

Meta

Mid-level

3Sum - Find all unique triplets in the array which gives the sum of zero

Comments

Your account is free and you can post anonymously if you choose.