How to Solve the 2 sums Challenge in c++ (Brute Force)

3 years ago
5

I did this video a while back and did not expect to re-upload this making it the first video on this channel. I also like to think I am not a very good teacher so I do apologize in advance. This is not only to help you but to help me as well to make sure I understand and mostly remember what I do.

This challenge is to find the 2 indexes of a given array that equal a target. This video covers the brute force way of solving it.

For example: given an array [1, 3, 7, 8], we want a target of 9, meaning two indexes must equal 9. That would be 0 and 3 in this case, so we would return 0, 3 for the challenge.

My videos are uploaded to Youtube as well.
This video: https://youtu.be/T9TlCJlywQg

*******Support the Channel*******
My Website : https://jstroup.dev/blog
Buy on Amazon : https://amzn.to/38rl8Y2

Loading comments...