Reference no: EM132142239
Question :
Suppose you have three non-empty stacks R, S, and T. Describe a sequence of Stack operations that results in S storing all elements originally in T below all of S's original element with both sets of those elements in their original order. The final configuration for R should the same as its original configuration.
For example, if R = (1, 2, 3), S = (4, 5), and T = (6, 7, 8, when ordered from bottom to top, then the final configuration should have R = (1, 2, 3), and S (6, 7, 8, 9, 4, 5).