Pert2 Flashcards Preview

Data Structures > Pert2 > Flashcards

Flashcards in Pert2 Deck (8):
1

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

2

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

3

Jenis-jenis linked list?

1. single linked list
2. circular single linked list
3. doubly linked list
4. circular doubly linked list
5. header linked list

4

untuk allocation pake malloc pada int?

int *px = (int*)malloc(sizeof(int));

5

untuk allocation pake malloc pada int?

int *px = (int*)malloc(sizeof(int));

6

in circular linked list, last node contain a pointer to?

first node

7

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.

8

kalau stack hanya ada yang paling atas. paling atas disebut?

top