You are on page 1of 2

25

27

10

76

21

1
2
3
Langkah 1: Index ke n = 6 sampai ke 2.

Index 6

21

76

21

76

10

21

76

27

10

21

76

25

27

10

21

76

27

10

21

76

2 ke 3 3
Langkah 2: Index ke n =16 sampai

6
21

76

10

21

76

10

27

21

76

10

25

27

21

76

25

27

21

76

Index (n-1) = 5
Index = 4
Index = 3
Index = 2

25

Index 6
Index (n-1) = 5
Index = 4
Index = 3

10

1
2
Langkah 3: Index ke n = 6 sampai ke 4.
Index 6
Index (n-1) = 5
Index = 4

21

21

76

21

27

76

25

27

76

10

21

25

27

76

Langkah 4: Index ke n = 6 sampai ke 5.


Index 6
Index (n-1) = 5

25

8
1
Langkah 5: Index ke n = 6 .

10

21

25

27

76

Index 6

10

21

25

27

76

Elemen sudah urut dan proses sorting selesai

27

76

27

76

27

76

You might also like