Valid Stack Sequence Leetcode Contest Questions