tags:

views:

34

answers:

2

I know 'dequeue' and 'enqueue' for Queues (remove and add respectively), but what is 'count'? Does that return the total number of items in the Queue, or only the top item in the queue?

I think I may be getting 'count' confused with the 'peek' used in Stacks - which returns the latest node at the top of the stack.

+1  A: 

Yes, it returns the total number of items in the queue.

Brett Widmeier
ty just making sure :)
HollerTrain
+3  A: 

If ever you are unsure, TRY IT! I find its much easier and more edifying to try stuff out first and ask question later. :)

Kevin Friedheim