a b c
head
pointer
data/informasi
a b c
head
null
data next
baru
10
head
baru
10 6 15
head
null
Node *p = head;
while (p!= NULL){
printf(“%d “, p->data);
p = p->next;
}
printf(“\n”);
8 10
head
baru
8 10
baru head
8 10
head
baru
baru->next = head;
head = baru;
5 8 10
head
baru
8 10
head
tail
8 10
head
tail
8 10 5
head
tail baru
6 8 10 5
head
baru
8 10 5
head
before
8 10 5
head
before
10 5
before
baru
10 5
before
baru
12 8 10 6 5
head
baru
8 10 6 5
head
after
8 10 6 5
head
after
10 6
after
12
baru
10 6
after
12
baru
8 10 12 6 5
head
hapus
8 10 12 6 5
hapus head
8 10 12 6 5
hapus head
hapus
head 10 12 6 5
hapus before
head 10 12 6 5
before hapus
head 10 12 6 5
before hapus
head 10 12 6 5
before hapus
hapus
10 12 6
head
hapus before
10 12 6
head
before hapus
10 12 6
head
before hapus
10 12 6
head
before hapus