Explanation is. I am having data in one queue. And also I am having three other queues. The process is I will pop each time one element from main queue and check the sizes of the 3 queues and insert the data in the queue which is havin minmum size