3Sum at Google
Medium38.6% acceptance
This problem has 75.0% frequency at Google.
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 Google Questions
Two SumEasyMedian of Two Sorted ArraysHardLongest Common PrefixEasyTrapping Rain WaterHardLongest Consecutive SequenceMedium
View all Google questions