Leetcode Grind Day 3
I have taken a few days off from the grind. I’ve been looking at purchasing my first home 🏡.
Today’s leetcode problem. We are given an array of integers nums, and an integer target. We need to return the indices of two numbers such that they add up to target. The constraints say that there will always be one valid answer in the given integer array.
My first thought is to use a nested for loop to starting iterating from index 0, and a secondary iterator to go down the list.