Title | Laporan ASD Modul 6 SINGLE & DOUBLE LINKED LIST |
---|---|
Author | A. Adyana Firdaus |
Pages | 17 |
File Size | 202.7 KB |
File Type | |
Total Downloads | 133 |
Total Views | 465 |
LAPORAN PRAKTIKUM VI SINGLE & DOUBLE LINKED LIST Disusun untuk Memenuhi Matakuliah Praktikum Algoritma dan Struktur Data Dibimbing oleh Bapak Wahyu Nur Hidayat, S.Pd., M.Pd. Oleh : Ari Candra Adyana Firdaus (170533628623) S1 PTI’17 OFF A UNIVERSITAS NEGERI MALANG FAKULTAS TEKNIK JURUSAN TEKNIK E...
LAPORAN PRAKTIKUM VI SINGLE & DOUBLE LINKED LIST Disusun untuk Memenuhi Matakuliah Praktikum Algoritma dan Struktur Data Dibimbing oleh Bapak Wahyu Nur Hidayat, S.Pd., M.Pd.
Oleh : Ari Candra Adyana Firdaus (170533628623) S1 PTI’17 OFF A
UNIVERSITAS NEGERI MALANG FAKULTAS TEKNIK JURUSAN TEKNIK ELEKTRO PRODI S1 PENDIDIKAN TEKNIK INFORMATIKA APRIL 2018
A. LATIHAN 1. Latihan : Program Single Linked List Non Circular a. Syntax Program #include #include #include //setw() using namespace std; struct node { int data; node* next; //untuk menghubungkan dengan node lain, tipe data dibuat sama seperti aturan penggunaan pointer }; node* node* node* node* node*
head; tail; curr; entry; del;
void inisialisasi() { head = NULL; tail = NULL; } void input(int dt) { entry = (node* )malloc(sizeof(node)); //alokasi memori entry->data = dt; entry->next = NULL; if(head==NULL) { head = entry; tail = head; } else { tail->next = entry; tail = entry; } } void hapus() { int simpan; if(head==NULL) { cout...