Two Sum II (Popular) Problem

Two Sum II (Popular) Problem — ExecCode Medium DSA Practice

Solve the Two Sum II (Popular) problem on ExecCode. Free online medium DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Two Sum II (Popular). Opposite ends on sorted array. For Two Sum II (Popular), focus on the exact input variables, return only the requested value, and preserve the required time complexity for the intended pattern.

Examples

Input {"numbers": [2, 7, 11, 15], "target": 9}; Output [1, 2]

Constraints

1 ≤ n ≤ 10^5

Practice Two Sum II (Popular) free on ExecCode. Browse DSA problems, topic map, and placement guides.