Fetching data...
This may take a moment
Back
1083. Two Sum Less Than K
Easy
Array
Two Pointers
Binary Search
Sorting
Solve on LeetCode
View Solutions
Description
Hints
Hint 1
What if we have the array sorted?
Hint 2
Loop the array and get the value A[i] then we need to find a value A[j] such that A[i] + A[j] < K which means A[j] < K - A[i]. In order to do that we can find that value with a binary search.
Similar Questions
Two Sum
Easy
Two Sum II - Input Array Is Sorted
Medium
3Sum Smaller
Medium
Subarray Product Less Than K
Medium
Statistics
Acceptance
62.1%
Submissions
237,485
Accepted
147,529