Two Sum - Part 3 - Interview Question

Basic HashMap, Array, Loop, and Big O knowledge.

This article is Part 3 of a series.

( Problem Recap )

Given an integer array and target, return the indices of the two numbers that add up to the target number.

You may not use the same element twice.
( Improving our answer )

Our previous answer contained two separate loops and a hash-map.


Sign up to continue reading

Learn better for Free.