Hey everyone, I'm having some trouble writing this program using queues. The main issue that I'm having right now is that I have three queues, each is size=5. The user inputs a number to remove from a queue. The program will pop all the values out of the 3 queues to temporary queues, remove the number that was input, and then put the numbers back, so that queue 1 is never (!(full_queue)) if queue 2 is (!(empty_queue).
So like if you have
1-2-3-4-5
6-7-0-0-0
0-0-0-0-0
and you remove 3, you're left with
1-2-4-5-6
7-0-0-0-0
0-0-0-0-0
What's happening is that if I keep it simple and put 1-2-3-4-5 in queue 1 and delete 4, it shows me that q1 contains 2-3-5-4-5 when I do a.queue[0] --> and so on.
However, I made a counter to count how many items are in q1, and it will tell me 4. Is there some reason outputting all the 5 slots is showing that the slot I deleted really isn't empty and all the numbers are jumbled around?