Build Array With Stack Ops

Given an integer array target and integer n, generate a list of operations to build the array using numbers from 1 to n. Two operations are available:

  • "Push": pushes the next number to the stack
  • "Pop": pops the top element from the stack

Return the list of operations to build the target array.

Examples
Input: [[1,3],3]
Output: ["Push","Push","Pop","Push"]
Hints

Build Array With Stack Ops

Given an integer array `target` and integer `n`, generate a list of operations to build the array using numbers from 1 to n. Two operations are available: