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