Google Coding Interview Questions Leetcode Javascript Solution