1 / 9

Pertemuan 4 Doubly Linked List

Pertemuan 4 Doubly Linked List. Matakuliah : T0026/Struktur Data Tahun : 2005 Versi : 1/1. Learning Outcomes. Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Mahasiswa dapat menghasilkan program modular dengan doubly linked list. Outline Materi.

mariel
Download Presentation

Pertemuan 4 Doubly Linked List

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Pertemuan 4Doubly Linked List Matakuliah : T0026/Struktur Data Tahun : 2005 Versi : 1/1

  2. Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : • Mahasiswa dapat menghasilkan program modular dengan doubly linked list

  3. Outline Materi • Pengertian doubly linked list • Deklarasi node doubly LL • Operasi-operasi doubly linked list • contoh program doubly linked list • insert data dalam doubly LL • delete data dalam doubly LL

  4. Abstract Model of a List Object

  5. Circular Doubly Linked Lists • Implemented on a Computer it might look something like this. The 4 node is the front() node & the 2 node is the back() node begin() returns an iterator to the 4 node end() returns an iterator to he header node

  6. Updating a Doubly Linked List

  7. Inserting a Node at a Position // insert newNode before curr newNode->prev = curr->prev; newNode->next = curr; curr->prev->next = newNode; curr->prev = newNode;

  8. Deleting a Node at a Position // unlink the node (*curr) from the list curr->prev->next = curr->next; curr->next->prev = curr->prev; delete curr;

  9. 9 Main Index Contents Deleting a Node at a Position // unlink the node (*curr) from the list curr->prev->next = curr->next; curr->next->prev = curr->prev; delete curr;

More Related