Beranda > Tugas Kuliah > jawaban tentang tugas algoritma yang baru

jawaban tentang tugas algoritma yang baru


Tugas ALGORITMA Semester 2 _____________________________________________________________________________________
Nama : Meidhy Eko Fitrianto
Nim : 0957201026
Jurusan : Sistem Informasi/S1
Mata Kuliah : ALGORITMA
Dosen : Agus Sumaryanto.S.Kom
Latihan
Perhatikan Array dibawah ini :
45 12 -1 0 4 5 -2 14 17 3
1 2 3 4 5 6 7 8 9 10

Soal :
Tuliskanlah langkah proses pengurutan dengan metode Algoritma :
a). Bubble Sort Descending
b). Minimum Sort Descending
c). Insertion Sort Descending
…………………………………………………………………………………………………………………………………………………….

a) Bubble Sort Descending

Langkah 1
K=N=10 17 3
K=9 17 14 3
K=8 17 -2 14 3
K=7 17 5 -2 14 3
K=6 17 4 5 -2 14 3
K=5 17 0 4 5 -2 14 3
K=4 17 -1 0 4 5 -2 14 3
K=3 17 12 -1 0 4 5 -2 14 3
K=2 45 17 12 -1 0 4 5 -2 14 3

Langkah 2
K=N=10 14 3
3K=9 14 -2 3
K=8 14 5 -2 3
K=7 14 4 5 -2 3
K=6 14 0 4 5 -2 3
K=5 14 -1 0 4 5 -2 3
K=4 14 12 -1 0 4 5 -2 3
K=3 45 17 14 12 -1 0 4 5 -2 3

Langkah 3
K=N=10 3 -2
K=9 5 3 -2
K=8 5 4 3 -2
K=7 5 0 4 3 -2
K=6 5 -1 0 4 3 -2
K=5 12 5 -1 0 4 3 -2
K=4 45 17 14 12 5 -1 0 4 3 -2

Langkah 4
K=N=10 3 -2
K=9 4 3 -2
K=8 4 0 3 -2
K=7 4 -1 0 3 -2
K=6 5 4 -1 0 3 -2
K=5 45 17 14 12 5 4 -1 0 3 -2

Langkah 5
K=N=10 3 -2
K=9 3 0 -2
K=8 3 -1 0 -2
K=7 4 3 -1 0 -2
K=6 45 17 14 12 5 4 3 -1 0 -2

Langkah 6
K=N=10 0 -2
K=9 0 -1 -2
K=8 3 0 -1 -2
K=7 45 17 14 12 5 4 3 0 -1 -2

Langkah 7
K=N=10 -1 -2
K=9 0 -1 -2
K=8 45 17 14 12 5 4 3 0 -1 -2

Langkah 8
K=N=10 -1 -2
K=9 45 17 14 12 5 4 3 0 -1 -2

Langkah 9
K=N=10 45 17 14 12 5 4 3 0 -1 -2

B) Minimum Sort Ascending

45 12 -1 0 4 5 -2 14 17 3
1 2 3 4 5 6 7 8 9 10

Langkah 1:
-2 12 -1 0 4 5 45 14 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 2:
-2 -1 12 0 4 5 45 14 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 3:
-2 -1 0 12 4 5 45 14 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 4:
-2 -1 0 3 4 5 45 14 17 12
1 2 3 4 5 6 7 8 9 10
Langkah 5:
-2 -1 0 3 4 5 45 14 17 12
1 2 3 4 5 6 7 8 9 10
Langkah 6:
-2 -1 0 3 4 5 45 14 17 12
1 2 3 4 5 6 7 8 9 10
Langkah 7:
-2 -1 0 3 4 5 12 14 17 45
1 2 3 4 5 6 7 8 9 10
Langkah 8:
-2 -1 0 3 4 5 12 14 17 45
1 2 3 4 5 6 7 8 9 10
Langkah 9:
-2 -1 0 3 4 5 12 14 17 45
1 2 3 4 5 6 7 8 9 10

c) Insertion Sort Descending

45 12 -1 0 4 5 -2 14 17 3
1 2 3 4 5 6 7 8 9 10

Langkah 1:
45 12 -1 0 4 5 -2 14 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 2:
45 12 -1 0 4 5 -2 14 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 3:
45 12 -1 0 4 5 -2 14 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 4:
45 12 0 -1 4 5 -2 14 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 5:
45 12 4 0 -1 5 -2 14 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 6:
45 12 5 4 0 -1 -2 14 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 7:
45 12 5 4 0 -1 -2 14 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 8:
45 14 12 5 4 0 -1 -2 17 3
1 2 3 4 5 6 7 8 9 10
Langkah 9:
45 17 14 12 5 4 0 -1 -2 3
1 2 3 4 5 6 7 8 9 10
Langkah 10:
45 17 14 12 5 4 3 0 -1 -2
1 2 3 4 5 6 7 8 9 10

Kategori:Tugas Kuliah
  1. 29 Agustus 2014 pukul 01:49

    It also comes with a recyclable Lithium-ion battery, plus USB power cord and adapter for a variety of handheld devices such as the i – Pod,
    i – Phone, mini USB, micro USB and more. After all, what super hero wants to carry an umbrella.
    If you are looking for strength, a backpack made from 1200D is better.

    Classic Baskets: Classic Style outdoor baskets are still seen in the market.

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: