Selasa, 13 Desember 2011

Peebedaan tracing antara BubbleSorting dan InsertionSorting

Bubble:  (Jumlah Interaksi = n-1)
0 =  5 4 3 2 1
1 =  1 5 4 3 2
2 =  1 2 5 4 3
3 =  1 2 3 5 4
4 =  1 2 3 4 5
Dari atas (Jumlah interaksi = 4)

Insertion:
0 =  5 4 3 2 1
1 =  4 5 3 2 1
2 =  3 4 5 2 1
3 =  2 3 4 5 1
4 =  1 2 3 4 5


0 comments:

Posting Komentar

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More