NeetCode #199LC-167MediumTwo PointersNC 150NC 250
← Back to All Problems

#199 · #167 · Two Sum II - Input Array Is Sorted(两数之和 II - 输入有序数组)

📌 Problem Statement & Constraints

Given a 1-indexed array of integers numbers sorted in non-decreasing order, find two numbers that add up to a target and return their 1-indexed positions. Exactly one solution exists and you may not use the same element twice. Constraints: 2 <= numbers.length <= 3 * 10^4, -1000 <= numbers[i] <= 1000, -1000 <= target <= 1000.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!