Jurnal Informatika (Sep 2016)

ANALISA PERBANDINGAN KOMPLEKSITAS ALGORITMA SELECTIONSORT DAN INSERTIONSORT

  • Reza Maulana

Journal volume & issue
Vol. 3, no. 2

Abstract

Read online

Abstract Sorting of data is one of the critical operations in data processing. There are various sorting algorithms. However, only some of which are used as the basis for the introduction and understanding of the learning process in an institution. Among the selection sort and insertion sort. Both sorting algorithm that is the focus of discussion on this scientific work. Is the domain on this occasion is a time to try to analyze the speed of the algorithm selection sort and insertion sort, with all the data input in the form of integers in a list or array of data at random intervals between 1,000 and 100,000 elements. Sorting algorithms selection algorithm has a complexity of O (n2 ), the same as the insertion sorting algorithms. Each of these types of algorithms have different levels of effectiveness. The effectiveness of an algorithm can be measured by how the amount of time it takes to run the algorithm. This article will only discuss and analyze the complexity of time for each type of algorithm. The algorithm is written in this paper is an algorithm that is implemented in C ++ programming language. Based on the complexity of the test of time, it can be concluded that the insertionsort algorithm is faster, than the selectionsort algorithm.