انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Queue data structure

الكلية كلية تكنولوجيا المعلومات     القسم قسم البرامجيات     المرحلة 2
أستاذ المادة حوراء شريف حمزة حسين       15/10/2012 08:48:01
The queue ADT is defined by the following operations:
constructor
Create a new, empty queue.
insert
Add a new item to the queue.
remove
Remove and return an item from the queue. The item that is returned is the first one that was
added.
empty
Check whether the queue is empty.
We know that a linear queue is a “first in first out “ data structure,i.e.,
• Insertion can be made only at the end and
• Deletion can be made only at the front.
In a linear queue, the traversal through the queue is possible only once,i.e.,once an element is
deleted, we cannot insert another element in its position. This disadvantage of a linear queue
is overcome by a circular queue, thus saving memory.
Circular Queue
A circular queue is a Queue but a particular implementation of a queue. It is very efficient. It is
also quite useful in low level code, because insertion and deletion are totally independant, which
means that you don t have to worry about an interrupt handler trying to do an insertion at the
same time as your main code is doing a deletion.

المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .