انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة
الكلية كلية تكنولوجيا المعلومات
القسم قسم البرامجيات
المرحلة 2
أستاذ المادة صفا سعد عباس المرعب
08/05/2017 08:54:10
Double Linked List Every node stores a reference to its previous node as well as its next. This is good if you need to move back by a few nodes and don t want to run from the beginning of the list. Double Linked lists Declaration Here’s part of the definition of Link. Here’s part of the creation of double liked list. Where head and tail are static DBLL. Public create() { DBLL head, tail; Input value of data d Head = new DBLL (d) ; // create the first node DBLL p = head; College of Information Technology / Software Department ……………………………………………………….. Data Structures / Second Class / 2016-2017 LEC. 8 45 For (int i=1 ; i<=n-1 ; i++) { Input value of data d tail = new DBLL (d) ; tail . before = p ; p . after = tail ; p = tail; } // for } // create ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// DOUBLE-LINKED LIST, insertion OPERATION. The insertfirst() method The insertfirst() method of linklist inserts a new link at the beginning of the list. The insertion it can be done in two steps: 1. Update the after link of a new node, to point to the current head node. 2. Update the before link of a current head node, to point to a new node. 3. Update head link to point to the new node.
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
|