Queue vs FIFO Buffer

The Queue is a type of FIFO data structure. If you were wondering why I created my own FIFO Buffer, here are the key differences between them:

  1. A Queue can not be fixed size. It keeps growing as you add more items to it. The FIFO Buffer is specified a fixed size and it throws away older items as you add items and the size exceeds.
  2. You can not remove items randomly from a Queue. They must be removed by using the Dequeue method, in the order in which they were added.

That's all there is! So if these two features are not a required, you should rather use the built in generic Queue class.

Posted on March 13, 2009 07:14 by Haider

Don't Post SPAM

If you are posting a commment just to get a link, don't waste your time!

I have a sophisticated comment moderation system in place, and your comment will not be posted.

Add comment




biuquote
  • Comment
  • Preview
Loading