... from the end of the left list into the stack, and when we encounteran element of p, we move the top of the stack to the beginning of the right list. If anelement of p is equal to an element of ... p, pk. At this point, the top of the stackis the index of the last element of q encountered. We move the top of the stack out, as the first entry of the right list. Since this reverse process ... is(w)=d. (In the example considered at the beginning of the proof, w = (421365), the consecutive decreasing subsequences are(4, 2, 1), (3), and (6, 5) and an increasing subsequence of maximal...