开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜