Given a vector A and target n, return the indices of two numbers that add up to n. If there are multiple solutions, return the first one.

Solution Stats

50 Solutions

17 Solvers

Last Solution submitted on Jan 03, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers17

Suggested Problems

More from this Author1

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!