data structures - Is using a linked-list to make a circular queue more advantageous than using an array? -
this understand circular queue -
- you specify size of circular queue @ start.
- enqueuing elements, once reach end of queue, can "circle" , start using first slot, provided has been dequeued , on.
the general advantage of using linked-list on array fact can have grow dynamically needed without having worry re-appropriating new space , copying elements. in case, putting limit on size of linked-list not make sense. why not use fixed size array instead?
and if not going specify size of circular queue point of using linked-list implement it. , how & when "circle" , start filling out dequeued slots?
am missing here?
Comments
Post a Comment