Leetcode 1: Two Sum problem – Multiple Solutions in Python

Two Sum problem is considered easy and is frequently asked in Amazon phone interviews. We will see how we can start with a brute force solution and try to improve the code by introducing more data structures.

Problem Statement: Given an array of integers nums and an integer target return indices of the two numbers such that they add up to target

Our aim will be to reduce time complexity and space complexity.

... Read More