https://www.geeksforgeeks.org/efficiently-implement-k-stacks-single-array/