Algoritma Linear Search dan Binary Search Berdasarkan Ukuran dan Kondisi Keterurutan Data
Keywords:
Binary search, Linear search, Sorting, Time complexityAbstract
This study compares the performance of Linear Search and Binary Search in data retrieval under varying dataset sizes and ordering conditions. Rather than relying solely on theoretical complexity, Binary Search is evaluated end-to-end by including the required sorting step prior to searching. A quantitative experiment is conducted in Python 3.13.9 using shuffled unique integer arrays with sizes ranging from to . Four target scenarios are tested: target located at the beginning, middle, end, and target not found. The primary metrics are execution time and summary statistics (median and mean) computed from repeated runs for each scenario. The results indicate that for a single search on initially unsorted data, the Sorting+Binary approach tends to yield a higher total time than Linear Search because sorting dominates the overall cost, while the binary search component itself remains comparatively small. The contribution of this work is an end-to-end evaluation that accounts for sorting overhead and provides practical guidelines for selecting the appropriate search algorithm across dataset sizes and query scenarios. These findings highlight that algorithm selection should account for data characteristics and preprocessing overhead; Binary Search is most beneficial when data is already sorted or when sorting costs can be amortized across repeated queries.
References
A. Kurhade and N. N. Takawale, “Comparative Study of Searching Algorithm: Linear Search and Binary Search,” Int. J. Adv. Res. Comput. Commun. Eng., vol. 13, no. 5, pp. 59–62, doi: 10.17148/IJARCCE.2024.13506.
N. A. Zinnia and E. Hanada, “Optimizing Search Strategies: A Study of Two-Pointer Linear Search Implementation and Binary Search Approaches,” 2024. [Online]. Available: https://arxiv.org/abs/2406.16729
R. Zidan, K. N. U. Rehman, and I. Khan, “Experimental Performance Benchmarking of Popular Search Algorithms in Java and Python,” Int. J. Comput. Appl., vol. 187, no. 62, pp. 31–38, Dec. 2025, doi: 10.5120/ijca2025926016.
A. S. Mohammed, Ş. E. Amrahov, and F. V Çelebi, “Interpolated binary search: An efficient hybrid search algorithm on ordered datasets,” Eng. Sci. Technol. an Int. J., vol. 24, no. 5, pp. 1072–1079, 2021, doi: https://doi.org/10.1016/j.jestch.2021.02.009.
Wahana, A., Firmansyah, E., Al Rosyid, H. I., Fuadi, R. S., & Maylawati, D. S. A. (2021). Fuzzy Tahani Method in the Recommendation System for Selecting Mountain Tourism Destinations in West Java.
Tamrin, M. A., Rizki, B., Nodas, A., Rahman, A., & Firmansyah, E. (2020). Perbandingan PenggunaanMetode Topsis dan Metode AHP dalam Penilaian Kinerja pada Karyawan (PT XYZ).Infoman's: JurnalIlmu-ilmu Informatika dan Manajemen,14(1).
Firmansyah, E., Herdiana, D., & Yuniarto, D. (2020, October). Examining readiness of e-Learningimplementation using information system readiness impact model. In2020 8th International Conferenceon Cyber and IT Service Management (CITSM)(pp. 1-5). IEEE.
Firmansyah, E., Rosmawati, R., Fuadi, R. S., Fauzy, D., & Ramdhani, M. A. (2019, December). Designof expert system to determine the proper diet using harmony search method. InJournal of Physics:Conference Series(Vol. 1402, No. 7, p. 077006). IOP Publishing.
Firmansyah, E., & Helmiawan, M. A. (2025). Pengukuran Kesiapan Transformasi Digital Desa Kaduwulung Menuju Desa Cerdas Berbasis SNI ISO 37122: 2019 Melalui Pemetaan Data Desa.Infoman's: Jurnal Ilmu-ilmu Informatika dan Manajemen,19(1).
Firmansyah, E., Herdiana, D., Yuniarto, D., & Junaedi, D. I. (2021, September). The K-Nearest Neighbor Algorithm for the Classification of Internet Users in Rural Campus. In 2021 9th International Conference on Cyber and IT Service Management (CITSM) (pp. 1-6). IEEE.
Zaliluddin, D., Bastian, A., Yuliani, M. S. S., Firmansyah, E., & Sumaryana, Y. (2024). Engaging Teens in History through a Mobile Game Utilizing the Fisher-Yates Shuffle Algorithm and Honeycomb UX Design. International Journal of Interactive Mobile Technologies, 18(22).
Syaripudin, U., Zaenal, R., Duri, M. F. A., Firmansyah, E., & Rahman, A. (2019, December). Comparison between Naïve Bayes and certainty factor to predict big five personality. In Journal of Physics: Conference Series (Vol. 1402, No. 7, p. 077030). IOP Publishing.
Rahmayani, R., Firmansyah, E., & Hikmah, H. U. (2025). Inovasi Layanan Antar Jemput Paket Surat PTPos Indonesia Berdasarkan Penjualan dan Minat Beli JOVISHE: Journal of Visionary Sharia Economy,4(1), 33-47.
Firmansyah, E., Rahman, A. B. A., & Subiyakto, A. A. (2023). Pengukuran Kesiapan Kota Cerdas Berdasarkan SNI ISO 37122: 2019.Infoman's: Jurnal Ilmu-ilmu Informatika dan Manajemen,17(2).
Zulfikar,W.B., Irfan, M., Ghufron, M., Jumadi, J., & Firmansyah, E. (2020). Marketplace affiliatespotential analysis using cosine similarity and vision-based page segmentation.Bulletin of ElectricalEngineering and Informatics,9(6), 2492-2498.
Ramadhan, N. D., Fhatturohmah, S., Ramadhani, S., & Firmansyah, E. (2023). Analysis of Digital WalletUsage on Consumptive Lifestyle.Journal of Islamic Economics and Business,3(2), 118-136.
B. M. Al-aydi and S. S. Abu-naser, “Comparative Study of Traditional and AI-Enhanced Sorting Algorithms : Comparative Study of Traditional and AI-Enhanced Sorting Algorithms : QuickSort , MergeSort , HeapSort , and TimSort,” vol. 9, no. September, pp. 70–79, 2025.
M. S. Meidiansyah, M. Sanputra, and A. Wardana, “Comparative Analysis of Searching and Sorting Algorithms in Student Data Processing,” Int. J. Educ. Inf. Technol. Others, vol. 2025, no. 3, pp. 148–157, 2025, [Online]. Available: https://jurnal.peneliti.net/index.php/IJEIT/article/view/12718
Python Software Foundation, “time — Time access and conversions — Python 3.14.2 documentation.” [Online]. Available: https://docs.python.org/3/library/time.html
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Infoman's : Jurnal Ilmu-ilmu Informatika dan Manajemen

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
![]()
This work is licensed under a Creative Commons Attribution 4.0 International License.








