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 hintsTopics
Also asked at 60 companies
More Microsoft Questions
Two SumEasyMedian of Two Sorted ArraysHardLongest Palindromic SubstringMediumContainer With Most WaterMediumLongest Common PrefixEasy
View all Microsoft questions