Pert2 Flashcards
what is Linked list?
a data structure that consists of a sequence of data records such that each record there is a field that contains a reference to the next record in the sequence
Perbedaan linked list dan array?
Array:
• Linear collection of data elements
• Store value in consecutive memory locations
• Can be random in accessing of data
Linked List:
• Linear collection of nodes
• Doesn’t store its nodes in consecutive memory locations
• Can be accessed only in a sequential manner
Jenis-jenis linked list?
- single linked list
- circular single linked list
- doubly linked list
- circular doubly linked list
- header linked list
untuk allocation pake malloc pada int?
int px = (int)malloc(sizeof(int));
untuk allocation pake malloc pada int?
int px = (int)malloc(sizeof(int));
in circular linked list, last node contain a pointer to?
first node
header linked list?
special type of linked list which contains a header node at the beginning of the list. jadi start di L gak point langsung ke note pertama, tapi contain address dari header note.
kalau stack hanya ada yang paling atas. paling atas disebut?
top