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 hints

Topics

Also asked at 10 companies


More Amazon Questions

View all Amazon questions