-
1. Two Sum
Difficult: Easy Approach: Simply using a brute force technique create two loops , loop over each element i for each element i iterate through the rest of the array with index j, starting from i+1. Check if the sum of nums[i] + nums[j] === target If it does then return the indices [i,j] Javascript Solution…
-
242. Valid Anagram
Difficulty: Easy Question: Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Example 1. Input: s = “anagram”, t =…