Arrays #01
Easy Two Sum
Find the two indices in an unsorted array whose values add up to the target.
Solved arrayhash mapcomplement lookup
Hash-map lookups, prefix-style scans, and the baseline decisions that show up in almost every interview loop. The focus here is one-pass scans and complement lookups. Official LeetCode problems are linked on every page instead of being mirrored here.
Every page keeps the problem summary, recognition pattern, reasoning, pitfalls, and the exact C++ source used on the site.
Find the two indices in an unsorted array whose values add up to the target.