Minimum Stack Leetcode Problems Javascript Array