Arrays

Three Sum

medium
Given an integer array `nums`, return all unique triplets `[nums[i], nums[j], nums[k]]` such that `i != j != k` and `nums[i] + nums[j] + nums[k] === 0`. The solution set must not contain duplicate triplets. Order of triplets / values inside a triplet may vary — the judge compares as multisets.
Hint steps(0/3 revealed)
  1. 1

    Complete previous step or reveal to unlock this hint.

  2. 2

    Complete previous step or reveal to unlock this hint.

  3. 3

    Complete previous step or reveal to unlock this hint.