IF2030_Proc_09_VariasiListLinier_bgn2

# firstl preclast last last nextlast nextlast

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Last) != First(*L)) { PrecLast = Last; Last = Next(Last); } /* Next(Last) = First(*L) */ *P = Last; if (PrecLast == Nil) { /* kasus satu elemen */ First(*L) = Nil; } else { Next(PrecLast) = First(*L); } Next(*P) = Nil; IF2030/Sem. 1 2011-2012 } 11/02/11 42 Beberapa Primitif void PrintInfo (List L) /* I.S. List mungkin kosong */ /* F.S. Jika list tidak kosong, */ /* Semua info yg disimpan pada elemen list diprint */ Semua info yg disimpan pada elemen list diprint */ /* Jika list kosong, hanya menuliskan "list kosong" */ { /* Kamus Lokal */ address P; /* Algoritma */ if (ListEmpty(L)) { printf("List Kosong \n"); } else { else P = First(L); printf("List : \n"); do { printf("%d \n", Info(P)); Info(P)); P = Next(P); } while (P != First(L)); } } 11/02/11 IF2030/Sem. 1 2011-2012 43 PR PR • Untuk praktikum 11: praktikum 11: – Modul pra-praktikum: P11. Variasi List Linier • Bagian 1. ADT List First-Last dengan Dummy pada ADT List First dengan Dummy pada Last • Bagian 2. ADT List Sirkuler • Bagian 3. ADT List dengan Double Pointer 11/02/11 IF2030/Sem. 1 2011-2012 44...
View Full Document

## This document was uploaded on 03/15/2014 for the course IF 2030 at Institut Teknologi Bandung.

Ask a homework question - tutors are online