3Sum Closest at Amazon
Medium48.0% acceptance
This problem has 50.0% frequency at Amazon.
Problem Description
Given an integer array `nums` of length `n` and an integer `target`, find three integers at **distinct indices** in `nums` such that the sum is closest to `target`. Return _the sum of the three integers_. You may assume that each input would have exactly one solution.
Read full problem and hintsTopics
Also asked at 10 companies
More Amazon Questions
Two SumEasyTrapping Rain WaterHardBest Time to Buy and Sell StockEasyNumber of IslandsMediumMedian of Two Sorted ArraysHard
View all Amazon questions