3Sum at Microsoft

Medium38.6% acceptance

This problem has 75.0% frequency at Microsoft.

Problem Description

Given an integer array nums, return all the triplets `[nums[i], nums[j], nums[k]]` such that `i != j`, `i != k`, and `j != k`, and `nums[i] + nums[j] + nums[k] == 0`. Notice that the solution set must not contain duplicate triplets.

Read full problem and hints

Topics

Also asked at 60 companies


More Microsoft Questions

View all Microsoft questions