Premium

3Sum (find unique triplets that sum to zero)

By FrontendAtlas Team · Updated Jan 31, 2026

Given an array of integers, return all unique triplets [a, b, c] such that a + b + c = 0. Triplets should be unique, and each triplet should be in non-decreasing order.

Challenge preview

3Sum (find unique triplets that sum to zero): Given an array of integers, return all unique triplets [a, b, c] such that a + b + c = 0. Triplets should be…. Expect arrays and algorithms decisions under intermediate level constraints.

Premium unlocks

  • Full editor workflow with starter files, tests, and solution context.
  • Edge cases, common mistakes, and complexity notes for the interview discussion.
  • Progress tracking once you unlock and complete the challenge.

Free warm-up options

Upgrade to FrontendAtlas Premium to unlock this challenge. Already upgraded? Sign in to continue.