Two Stack Problem Leetcode Javascript 30