Research and Analysis of Exchange Sort Algorithm in Data Structure - Putra, Tri Dharma; Purnomo, Rakhmat (Sinkron : jurnal dan penelitian teknik informatika, 2025)
Exchange sort is different from bubble sort. Exchange sort compares an element with other elements in the array, and swaps elements if necessary. So there is an element that is always the center element (pivot). Here is its theoretical description: Comparison, the algorithm compares each element with its adjacent element. Then continue until all elements are compared. Swap: If the elements are in the wrong order (for example, in ascending order, if the left element is greater than the right), they are swapped. This swapping continues until all match numbers are swapped. Iteration, this process of comparing and swapping, is repeated for each pair of adjacent elements in the array. Looping, this process is repeated a number of times (traversing) the array until no more swapping is required, indicating that the array is sorted. It is concluded that for the six numbers in these three case studies, the iterations needed are 5 iterations each. The swaps counts needed are 7, for case study 1. The swap counts needed are 12 for case study 2 and the swap counts are 8 for case study 3. In this research and analysis, the order, all of them is descending, although it can be made ascending. In modern days, exchange sort plays a very important role in terms of sorting algorithms. This paper is only research and analysis. For novelty, the analysis is given with a clear step-by-step procedure of the algorithm.