Stack operations!!
CodeChefOpen on judge ↗
Roshan likes **Stack data structure** and **its operation**. Roshan has two arrays $A$ and $B$ of unique elements of size $N$. He wants to know whether one array is a stack permutation of the other array or not. Roshan defines the stack permutation as: Stack permutation means that one array can be created from another array using a *stack* and **stack operations**. Roshan is busy doing some wo
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start