Valid Stack Permutation Leetcode