|Computer|Blogging|Programming|Informatics|Network|Technology|
Sorting adalah operasi untuk membuat berkas data dalam kondisi urut naik atau turun.
Masalah :
Metode sorting : metode seleksi, metode bubble, metode sisipan, metode cepat, metode radix, metode pohon biner, metode merge, metode shell, metode tournament, metode heap.
1 Metode Seleksi:
Algoritmanya adalah sebagai berikut:
-Â Â Â Â Â Â Â Â Dicari data yang terkecil (terbesar) dari data pertama sampai terakhir, lalu data terkecil (terbesar) ditukar dengan data pertama.
-Â Â Â Â Â Â Â Â Data terkecil (terbesar) dicari mulai dari data kedua sampai data terakhir, lalu data terkecil (terbesar) ditukar dengan data kedua.
-Â Â Â Â Â Â Â Â Demikian seterusnya sehingga terurutkan naik atau turun, tergantung yang dikehendaki.
Metode ini cocok untuk struktur data larik, maupun rantai.
Contoh penggunaan metode seleksi (lihat pada halaman berikutnya):
|
I |
A(I) |
Lewatan ke- |
||||||||
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
||
|
1 |
42 |
11 |
11 |
11 |
11 |
11 |
11 |
11 |
11 |
11 |
|
2 |
23 |
23 |
23 |
23 |
23 |
23 |
23 |
23 |
23 |
23 |
|
3 |
74 |
74 |
74 |
36 |
36 |
36 |
36 |
36 |
36 |
36 |
|
4 |
11 |
42 |
42 |
42 |
42 |
42 |
42 |
42 |
42 |
42 |
|
5 |
65 |
65 |
65 |
65 |
65 |
58 |
58 |
58 |
58 |
58 |
|
6 |
58 |
58 |
58 |
58 |
58 |
65 |
65 |
65 |
65 |
65 |
|
7 |
94 |
94 |
94 |
94 |
94 |
94 |
94 |
74 |
74 |
74 |
|
8 |
36 |
36 |
36 |
74 |
74 |
74 |
74 |
94 |
87 |
87 |
|
9 |
99 |
99 |
99 |
99 |
99 |
99 |
99 |
99 |
99 |
94 |
|
10 |
87 |
87 |
87 |
87 |
87 |
87 |
87 |
87 |
94 |
99 |
2 Metode Bubble
Algoritmanya adalah sebagai berikut:
-Â Â Â Â Â Â Â Â Elemen data pertama dibandingkan dengan elemen kedua. Bila elemen kedua lebih kecil (besar), kedua elemen tersebut ditukar.
-Â Â Â Â Â Â Â Â Elemen data kedua dan ketiga dibandingkan. Bila dipenuhi syarat seperti langkah sebelumnya, kedua elemen tersebut ditukar.
-Â Â Â Â Â Â Â Â Proses terus berlangsung dengan elemen ketiga dan keempat, dan seterusnya sampai akhir deretan rekaman.
-Â Â Â Â Â Â Â Â Apabila sudah tidak ada elemen yang ditukarkan, proses berhenti dan selesai. Bila terjadi pertukaran selama lewatan, proses akan diulang. Sehingga akhirnya semua elemen tersusun, tidak ada pertukaran lagi, dan algoritma berhenti.
Contoh penggunaan metode bubble (lihat halaman berikutnya):
|
I |
A(I) |
Lewatan ke- |
|||||
|
1 |
2 |
3 |
4 |
5 |
6 |
||
|
1 |
42 |
23 |
23 |
11 |
11 |
11 |
11 |
|
2 |
23 |
42 |
11 |
23 |
23 |
23 |
23 |
|
3 |
74 |
11 |
42 |
42 |
42 |
36 |
36 |
|
4 |
11 |
65 |
58 |
58 |
36 |
42 |
42 |
|
5 |
65 |
58 |
65 |
36 |
58 |
58 |
58 |
|
6 |
58 |
74 |
36 |
65 |
65 |
65 |
65 |
|
7 |
94 |
36 |
74 |
74 |
74 |
74 |
74 |
|
8 |
36 |
94 |
87 |
87 |
87 |
87 |
87 |
|
9 |
99 |
87 |
94 |
94 |
94 |
94 |
94 |
|
10 |
87 |
99 |
99 |
99 |
99 |
99 |
99 |
3 Metode Sisipan
Algoritmanya adalah sebagai berikut:
-Â Â Â Â Â Â Â Â rekaman pertama ditempatkan pada posisi pertama dalam suatu daftar baru. Selanjutnya data kedua dibandingkan dengan data pertama tersebut. Pada pemilahan data urut naik, bila data kedua lebih kecil, rekaman pertama tadi digeser satu posisi ke bawah dan ditempatkan rekaman kedua pada posisi pertama dalam daftar baru. Apabila data kedua lebih besar, maka rekaman kedua ditempatkan pada posisi kedua dalam daftar baru.
-Â Â Â Â Â Â Â Â Langkah-langkah berikutnya, rekaman demi rekaman disisipkan pada posisi yang sesuai dalam daftar baru yang dibangun itu.
Metode ini dapat diterapkan pada struktur data larik maupun rantai
Contoh penggunaan metode sisipan (lihat halaman berikutnya):
|
I |
A(I) |
Lewatan ke- |
||||||||
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
||
|
1 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
3 |
1 |
|
2 |
11 |
|
11 |
4 |
4 |
4 |
4 |
4 |
4 |
3 |
|
3 |
4 |
|
|
11 |
6 |
5 |
5 |
5 |
5 |
4 |
|
4 |
6 |
|
|
|
11 |
6 |
6 |
6 |
6 |
5 |
|
5 |
5 |
|
|
|
|
11 |
9 |
7 |
7 |
6 |
|
6 |
9 |
|
|
|
|
|
11 |
9 |
8 |
7 |
|
7 |
7 |
|
|
|
|
|
|
11 |
9 |
8 |
|
8 |
8 |
|
|
|
|
|
|
|
11 |
9 |
|
9 |
1 |
|
|
|
|
|
|
|
|
11 |
Lebih efisien untuk selipkan suatu nilai pada tabel yang sudah terurut
4 Metode Shell
Metode sorting ini merupakan perluasan dari metode sisipan. Dalam hal ini, pembandingan rekaman bukan dengan rekaman yang berdekatan, tetapi pada rekaman dengan spasi tertentu misalnya babak pertama 5 spasi, babak kedua 2 spasi dan babak terakhir 1 spasi. Penentuan besar spasi pada setiap babak pengulangan tidak dilakukan berdasarkan suatu algoritma tertentu, karena memang tidak ada algoritma untuknya.
Sorting data dengan metode ini mungkin akan gagal apabila pemilihan spasi tidak cocok.
Ilustrasi metode shell (lihat halaman berikutnya):
|
3 |
11 |
4 |
6 |
5 |
9 |
7 |
8 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Babak I |
3 |
7 |
4 |
1 |
5 |
9 |
11 |
8 |
6 |
|
|
|
|
|
|
|
|
|
|
|
| Babak II |
3 |
7 |
4 |
1 |
5 |
9 |
11 |
8 |
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
1 |
4 |
7 |
5 |
8 |
6 |
9 |
11 |
|
|
|
|
|
|
|
|
|
|
|
|
| Babak III |
3 |
1 |
4 |
7 |
5 |
8 |
6 |
9 |
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Hasil |
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
11 |
|
|
|
|
|
|
|
|
|
|
5 Metode Cepat (Quicksort)
Algoritmanya adalah sebagai berikut:
-Â Â Â Â Â Â Â Â Seleksi suatu perkiraan nilai median dari elemen yang akan diurutkan
-Â Â Â Â Â Â Â Â Larik ditelusuri, elemen dipertukarkan sampai larik terbagi menjadi dua bagian; elemen yang lebih besar daripada median, dan elemen yang lebih kecil atau sama dengan (?) elemen median.
-Â Â Â Â Â Â Â Â Dua langkah di atas diulang pada tiap bagian yang memiliki lebih dari P elemen (sebaiknya P<10).
-Â Â Â Â Â Â Â Â Setelah bagian-bagian cukup kecil, setiap bagian diurutkan dengan metode Bubble
Bookmark dolo ah… pengetahuan yang berbeda 16:04
nyoba kirim komentar siang-siang gini. 01:47
Mencari pencerahan di rumah sahabat, berkelana di ladang ilmu 07:46
Kira-kira bisa bikin posting sebagus ini gak ya? 23:46 blog walking plugin can be downloaded blog-walk.com
jreng-jreg,…
saya mau numpang majang dulu 02:47
mencari update terbaru 08:45
Artikelnya keren banget … info bagus banget
15:08 blog walking plugin can be downloaded blog-walk.com
Artikelnya keren banget … info bagus banget
07:38 blog walking plugin can be downloaded blog-walk.com
Ada lagi gak yang bagus seperti ini . 07:55 blog walking plugin can be downloaded blog-walk.com
Salam kenal …. saya senang melihat-lihat blog anda blog walking plugin can be downloaded blog-walk.com
cuma algoritma aja ya?
koding nya ga ada?
tolong dong informasi kelebihan dan kekurangan dari masing2 metode itu dan kasih contong source code
An awesome blogpost, I simply given this onto trainees who had previously been performing a little analysis on that. Anf the husband the fact is bought me breakfast because I stumbled upon it for him.
.. So ok, i’ll reword that: Information treat! But yeah Thank you spending some time to go over this, I feel strongly over it and get learning much more about this topic. If possible, since you gain expertise, could you mind updating your website with additional details? It is very helpful for me. Big thumb up in this post!
increase low sperm count the length of time to cultivate sperm sperm production process increase sperm count and motility more sperm when ejaculating how to increase seminal production vitamins to extend sperm fertility produce more sperm without pills sperm motility test ejaculate lacking erection improve sperm taste increasing sperm fertility what vitamins increase sperm ejaculate harder natural ways to improve sperm count how to boost the amount you ejaculate vitamins to enhance sperm quality the best way to improve ejaculation time how do you raise the amount i ejaculate ejaculate without erection how to improve ejaculation distance best sperm count improve sperm count morphology sperm improve low sperm count successes sperm gain male sperm problems human sperm production rate increasing ejaculation fluid foods that increase sperm load
Abnormal this publish is totaly unrelated to what I was searching google for, but it used to be indexed on the first page. I guess your doing something right if Google likes you enough to place you on the first page of a non comparable search.
Deference to op , some great selective information .
Hello! I simply would like to give an enormous thumbs up for the great information you could have right here on this post. I will probably be coming back to your blog for extra soon.
I’m impressed, I have to say. Really hardly ever do I encounter a blog that’s each educative and entertaining, and let me inform you, you could have hit the nail on the head. Your concept is excellent; the problem is something that not enough persons are speaking intelligently about. I’m very glad that I stumbled across this in my search for one thing regarding this.
Whats up! I simply want to give a huge thumbs up for the great information you have here on this post. I will be coming again to your weblog for more soon.
I simply want to mention I’m newbie to blogs and truly savored your web blog. Probably I’m want to bookmark your blog post . You certainly come with very good posts. Appreciate it for sharing with us your web-site.
Excellent issues?I’d notice that as somebody who truly doesn’t write on blogs much (if truth be told, this can be my first publish), I don’t assume the term ‘lurker’ is very turning into to a non-posting reader. It’s not your fault in the slightest degree , but most likely the blogosphere may come up with a greater, non-creepy title for the 90% folks that experience reading the content material .
Thank you for making the trustworthy try to provide an explanation for this. I feel very robust approximately it and wish to learn more. If it’s OK, as you reach extra in depth wisdom, would you mind including extra posts similar to this one with more information? It will be extremely helpful and helpful for me and my colleagues.
I have been studying your entries right through my morning holiday, and I will have to admit the entire article has been very enlightening and rather well written. I believed I might allow you to realize that for a few reason why this weblog does not view well in Internet Explorer 8. I desire Microsoft could prevent changing their software. I’ve a question for you. Would you thoughts changing weblog roll hyperlinks? That would be truly neat!
Ordinary this put up is totaly unrelated to what I was searching google for, nevertheless it used to be indexed at the first page. I assume your doing something right if Google likes you adequate to place you on the first page of a non similar search.
Atypical this submit is totaly unrelated to what I used to be looking google for, but it surely was listed at the first page. I assume your doing something right if Google likes you enough to place you on the first web page of a non similar search.
Im getting a browser error, is other people? When are you going to post again? You actually inform many people! Cheers with this short article, it had become great to learn. Appreciate the efforts you cash in on in writing this post. Im hoping a similar appropiate product by you in the foreseeable future too. Actually your creative writing abilities has inspired me to start my very own BlogEngine blog now. The blogging is spreading its wings rapidly. Your article can be a fine illustration showing it.
“The way to love anything is to realize that it may be lost.” ~ Gilbert K. Chesterton
Free web directory to get your site higher in search engies
Hello there, just discovered your blog on Yahoo, and found that it’s really baller. I am gonna watch out for diamonds. I’ll be grateful if you keep on writing about this topic later on. A lot of students will benefit from your posting. Take care!
July 3 in the Citrus Bowl in Orlando – 4 PM to 9 PM. Public invited. Invitational*
Beautiful essay, got the pleasure of reading
This really is so typical, I can not feel individuals are doing this but whatever
Its like you read my mind! You appear to know so much about this, like you wrote the book in it or something. I think that you can do with a few pics to drive the message home a little bit, but instead of that, this is great blog. A great read. I will definitely be back.
Seeing this page I am sure that i may well know from college, did happen to go to Texas Technical? If you ever did remember to blast myself an email so we can easily catch up it’s been several years! Look forward to speaking with you and wish all will be well with you.
You will get really rich soon brilliant pidgeon makers. I mean you create a lot of brilliants.Just have to sell them and youll be rich in no time.
Intriquing, notable and informative. But do you want to discuss this blog more? I can’t quite remember what he was selling.
Great beat ! I wish to apprentice while you amend your web site, how could I subscribe for a blog web site? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear idea
The Giants and their fans deserve better than that kind of incompetence.
Excellent blog here! Also your website loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my site loaded up as quickly as yours lol
This is very interesting, You are a very skilled blogger. I have joined your feed and look forward to seeking more of your great post. Also, I have shared your website in my social networks!
I’m impressed, I must say. Really hardly ever do I encounter a blog that’s both educative and entertaining, and let me inform you, you’ve gotten hit the nail on the head. Your idea is excellent; the issue is something that not sufficient persons are speaking intelligently about. I’m very completely satisfied that I stumbled across this in my search for something relating to this.
You mentioned something in your post that we talked about some time ago. It was the beginning of the discussions surrounding Sabeans falied farm system to develop any impact position players. Until Sandoval, there had been no impact position players come out of the Giants system since Sabean came to the Giants as an assistant to Bob Quinn in the mid 90s. And even Sabean was taken by surprise, saying as late as the end of March, that he wasnt sure if Sandoval would make the team or not, but that Aurillia and Burris were sure things.
Thanks for making the trustworthy attempt to provide an explanation for this. I feel very robust about it and wish to learn more. If it’s OK, as you reach more extensive knowledge, might you mind adding more posts very similar to this one with additional information? It will be extraordinarily useful and helpful for me and my colleagues.
I feel that may be an enchanting aspect, it made me think a bit. Thank you for sparking my thinking cap. Infrequently I get such a lot in a rut that I just really feel like a record.
I couldn’t get some of your links to work. Like your rss link just sent me back to your index page.
Thanks for making the honest try to explain this. I feel very strong about it and want to learn more. If it’s OK, as you reach extra in depth knowledge, would you thoughts adding extra posts similar to this one with additional information? It will be extraordinarily useful and useful for me and my colleagues.
Thanks for making the trustworthy effort to talk about this. I believe very robust about it and would like to read more. If it’s OK, as you acquire more in depth knowledge, would you mind including extra articles similar to this one with more information? It would be extremely useful and helpful for me and my friends.
I couldn’t resist commenting
I admire the valuable knowledge you offer in your articles. I will be able to bookmark your blog and feature my children check up right here generally. I’m quite sure they are going to be informed a variety of new stuff here than any one else!
I in addition to my buddies appeared to be checking the nice pointers found on your site while before long I got a terrible feeling I had not thanked you for those strategies. The boys were totally glad to learn all of them and have in effect seriously been taking pleasure in those things. Appreciation for indeed being well helpful and also for having this kind of incredible things most people are really wanting to discover. Our own honest apologies for not saying thanks to you earlier.
http://www.photography-camera.biz
You made some decent points there. I looked on the internet for the issue and found most individuals will go along with with your website.
http://www.perfumefor.net
Following Feng Shui principles will assist you in forming the correct decisions about everything from furniture placement to light systems, Wash Sale Rule, 595271, Military Pay Chart, ardwg, Pittsburgh International Airport, 093470, Pimp Myspace Profile, nfksbr, All Nippon Airlines, tndzmi, Associated Wholesale Grocers, %))), African Methodist Episcopal, 8647, The Lions Den, =[[, Our Man In Havana, lbxwt, Nothing Gold Can Stay, %(((, South Seas Island Resort, >:-]]], Indianapolis Public Schools, 030166, Boot Camp Workouts, 48184, St Cloud Minnesota, riwi, Half Moon Bay, wbz, Pitbulls For Sale, yisq, Shasta Regional Medical Center, 8-[, Pearl Jam Ten, rcqzz, Phoenix Country Club, %-PP, The Paradies Shops,
, Museum Of Anthropology, 45895, Jeff Dunham Comedy Central, 751, Suntrust Mortgage Inc, 8-), The Klondike Gold Rush, 312, Blue Ridge Numerics, ijh, Heli Attack 2, igwl, Morris Knolls High School, 0123, Watch Smallville Free, 7846, Working In Dubai, 744057, Intel Pro Wireless, ywdu, Led Holiday Lights, 8-DD,