Queues and the term 'Count' - What Does Count Do Exactly Again?
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 'pee开发者_StackOverflow中文版k' used in Stacks - which returns the latest node at the top of the stack.
Yes, it returns the total number of items in the queue.
精彩评论