Pert2 Flashcards

1
Q

what is Linked list?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Perbedaan linked list dan array?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Jenis-jenis linked list?

A
  1. single linked list
  2. circular single linked list
  3. doubly linked list
  4. circular doubly linked list
  5. header linked list
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

untuk allocation pake malloc pada int?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

untuk allocation pake malloc pada int?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

first node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

header linked list?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A

top

How well did you know this?
1
Not at all
2
3
4
5
Perfectly