Analisis Algoritma Insertion Sort, Merge Sort Dan Implementasinya Dalam Bahasa Pemrograman C++

Main Article Content

Arief Hendra Saptadi
Desi Windi Sari

Abstract

This paper presents the study of implementation and performance in sorting process, using two different algorithms, namely Insertion Sort and Merge Sort. In the first stage, the two algorithms were implemented in C++ language to sort several numbers typed by a user. In the second stage, the source codes for those algorithms were modified to enable sorting randomly generated numbers with the amount as requested by the user. To find out how well they performed in sorting out the data, therefore in the last stage the two algorithms were tested to sort random numbers with predetermined amount ranges and the results were compared. From the experiments performed, merge sort algorithm had shown a better performance, particularly in a large number of data (> 10000). Insertion sort algorithm has the advantage in lower complexity algorithm, notably in the best case condition and since it does not use recursion routines in sorting process, hence it does not require as much storage space or memory as needed by merge sort algorithm.

Downloads

Download data is not yet available.

Article Details

How to Cite
[1]
A. Saptadi and D. Sari, “Analisis Algoritma Insertion Sort, Merge Sort Dan Implementasinya Dalam Bahasa Pemrograman C++”, INFOTEL, vol. 4, no. 2, pp. 10-17, Nov. 2012.
Section
Articles

References

[1] Atrinawati, L. H. Analisis Kompleksitas algoritma untuk Berbagai Macam Metode Pencarian Nilai (Searching) dan Pengurutan Nilai (Sorting) pada Tabel. Program Studi Teknik Informatika. ITB. Bandung.
[2] Bingheng, W. 2008. Merge Sort. Dept. of Computer Science. Florida Institute of Technology. Florida, USA.
[3] Drozdek, A. 2001. Data Structures and Algorithms in C++. Brooks/Cole Thomson Learning. California. USA.
[4] Hibbler, R. 2008. Merge Sort. Dept. of Computer Science. Florida Institute of Technology. Florida, USA.
[5] Horman, T. H., Leiserson, C. E., Rivest, R. L., dan Stein, C. 2009. Introduction to Algorithms. The MIT Press. Cambridge. Massachusetts London. England.
[6] Horstmann, C. 2008. C++ for Everyone. Wiley Publishing. San Jose, USA.
[7] Karve, S. Insertion Sort Example. http://www.dreamincode.net/code/snippet279.htm. Diakses pada 18 Mei 2011.
[8] Kristanto, A. 2009. Algoritma dan Pemrograman dengan C++. Graha Ilmu. Yogyakarta.
[9] Liberty, J., Rao, S., Jones, B. 2008. Sams Teach Yourself C++ in One Hour a Day. Sams Publishing. Indiana, USA.
[10] MSDN. GetTickCount Function. http://msdn.microsoft.com/en-us/library/ms724408%28v=vs.85%29.aspx. Diakses pada 17 Mei 2011.
[11] Santosa, P.I. 2004. Struktur Data Menggunakan Turbo Pascal. Penerbit ANDI. Yogyakarta.
[12] Song, Q. 2008. Merge Sort Algorithm. Dept. of Computer Science. Florida Institute of Technology. Florida, USA.
[13] Yatini, I. dan Nasution, E. 2005. Algoritma dan Struktur Data. Graha Ilmu. Yogyakarta.