Stack Using Arraylist Leetcode Solutions Cpp