Coding Interview Prep: The Two-number sum problem.

Moeedlodhi
2 min readNov 9, 2023

Let’s make this a bit more useful.

I faced this recently. Yea sure, One could use ChatGPT to solve it for them but no harm in sharing my experience on how I solved this. So let’s get started.

The problem is straightforward and simple. We have an array of integers as shown below:

[1, 6, 5, 3, 4, 7, 3, -1, 4, 2]

And a target value which can be let’s say 12.

The job is to find any two numbers inside of the array that can add up to be equal to the

--

--