Top Amazon Questions Leetcode Javascript Solution