How to implement 3 stacks with one array?
Space (not time) efficient. You could: 1) Define two stacks beginning at the array endpoints and growing in opposite directions. 2) Define the third stack as starting in the middle and growing in any direction you want. 3) Redefine the Push op, so that when the operation is going to overwrite other stack, you shift …