One of the first problems of most programmers
I got the bruteforce (unoptimized) solution to this pretty quickly
The proper way to do this is using hashmaps, I never thought about it this way and this approach is quite good.
I think the reason I didn’t think of this solution is because whenever I think of something that works instead of thinking how to make it better I just code it up
This was quite pitiful performance for such an easy question the solution I coded up should have been better.
Github Link: https://github.com/LaZeAsh/competitive-programming/tree/main/Leetcode/cpp/1-Two-Sum