Analisis Perbandingan Kinerja Metode Rekursif dan Metode Iteratif dalam Algoritma Linear Search
The linear search algorithm is one of the most popular data search algorithms. In the process of searching data for a list using a linear search algorithm, it can be applied in an iterative and recursive way. The general view of linear search algorithms is that the iterative methods perform the same as recursive methods. However, some studies contradict this statement which may not apply in all cases. From this analysis, this study focuses on the comparison of recursive and iterative methods on linear search algorithms to find out which algorithm is the most suitable, efficient, and effective. The research was conducted using 3 case studies with data of 1 million, 10 million, and 100 million respectively. The research focuses on the results of memory usage and access time in the data search process using Big-O notation and Python programming language. The results show that the iterative linear search algorithm is more effective and efficient than recursive. Although both methods have the same Big-O complexity, the results of program execution show different results. With the results of an iterative linear search algorithm, the results of the execution time and memory usage are superior, namely, the access time and memory usage are less than the recursive method.