popped array.pushed array.
a. Push the current element onto the stack.
b. While the stack is not empty and the top of the stack equals the element at the current pointer in the popped array:
i. Pop the top element from the stack.
ii. Increment the popped pointer.true, indicating that the popped sequence is valid. Otherwise, return false.