https://www.wikitechy.com/technology/efficiently-implement-k-stacks-single-array/
How to efficiently implement k stacks in a single array