By :
M. Alif Muwafiq B
 Suatu kumpulan data yang mana
penambahan elemen hanya bisa dilakukan
pada satu ujung (rear), dan penghapusan
lewat ujung...
 implementasi
- Linear array
- Circular array
1 2 3 4 5
FEDCBA
6
MAX
masukkeluar
Depan = 1
Belakang = 0 F
E
D
C
B
A
Inc (Belakang);
Antrian[belakang] := X
BLKG
create
B...
1 2 3 4 5
FEDCBA
6
MAX
masukkeluar
Depan = 1
Belakang = 4 F
E
D
C
B
A
X := antrian [depan]
Inc (depan);
PROSES
BLKG BLKG B...
1 2 3 4 5
FEDCBA
6
MAX
masukkeluar
Depan = 1
Belakang = 4 F
E
D
C
B
APROSES
BLKG BLKG
DEQUEUE (KELUAR)
X := antrian [1]
Fo...
Upcoming SlideShare
Loading in …5
×

Queue (antrian)

1,091 views

Published on

quee with pascal

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,091
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Queue (antrian)

  1. 1. By : M. Alif Muwafiq B
  2. 2.  Suatu kumpulan data yang mana penambahan elemen hanya bisa dilakukan pada satu ujung (rear), dan penghapusan lewat ujung yang lain (front). EDCBA masukkeluar Front (depan) rear (belakang)
  3. 3.  implementasi - Linear array - Circular array
  4. 4. 1 2 3 4 5 FEDCBA 6 MAX masukkeluar Depan = 1 Belakang = 0 F E D C B A Inc (Belakang); Antrian[belakang] := X BLKG create BLKG BLKG BLKG BLKG BLKG ENQUEUE (MASUK)
  5. 5. 1 2 3 4 5 FEDCBA 6 MAX masukkeluar Depan = 1 Belakang = 4 F E D C B A X := antrian [depan] Inc (depan); PROSES BLKG BLKG BLKG DEQUEUE (KELUAR)
  6. 6. 1 2 3 4 5 FEDCBA 6 MAX masukkeluar Depan = 1 Belakang = 4 F E D C B APROSES BLKG BLKG DEQUEUE (KELUAR) X := antrian [1] For i := 1 to belakang -1 do Antrian [i] := antrian [i+1]; Dec (belakang); BLKG

×