Compute the full image of one captured permutation under ONE deterministic POP-S...
https://datenvertrag.halowerk.com/v1/pop-stack-permutation-imageOverview
Compute the full image of one captured permutation under ONE deterministic POP-STACK pass. Read left to right. Before pushing a new value, if it exceeds the current stack top, empty the ENTIRE stack into the output; after the final input, empty the stack. Equivalently reverse each maximal consecutive decreasing run, retaining the order of those runs. Return the entire output word. For example, [2,0,1] maps to [0,2,1].