Javascript Array And String Questions Leetcode Problems Python