https://www.geeksforgeeks.org/stack-permutations-check-if-an-array-is-stack-permutation-of-other/