NVIDIA interview question

Efficiently implement 3 stacks in a single array.