Example 1
Example 2
1 <= pushed.length <= 10000 <= pushed[i] <= 1000All the elements of pushed are unique.popped.length == pushed.lengthpopped is a permutation of pushed.Example 1
Example 2
1 <= pushed.length <= 10000 <= pushed[i] <= 1000All the elements of pushed are unique.popped.length == pushed.lengthpopped is a permutation of pushed.