Single Link List =
Satu
Double Link List =
Dua
Multiple Link List =
Lebih dari dua
Size Of : Bisa
menyesuaikan isi struct
Malloc :
mengembalikkan alamat, type datanya (void *)
Push Depan
Void push depan(int
n){
curr = (struct data*)malloc(sizeof(struct
data));
curr->value = n;
if(head == NULL) head = tail = curr;
else {
curr ->next = head;
head = curr;
}
tail->next = NULL;
}
Push
Belakang
Void push
belakang(int n){
curr = (struct data*)malloc(sizeof(struct
data));
curr->value = n;
if(head == NULL) tail = head = curr;
else {
tail->next = curr;
taill = curr;
}
tail->next = NULL;
}
Nama : Mutia Nur Utami
Nim : 1701336975
Tidak ada komentar:
Posting Komentar