Abdul Rahman, Gilang
Unknown Affiliation

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Algoritma Linear Search dan Binary Search Berdasarkan Ukuran dan Kondisi Keterurutan Data Abdul Rahman, Gilang; Indra Junaedi, Dani; Santika, Deris
Infoman's : Jurnal Ilmu-ilmu Informatika dan Manajemen Vol. 19 No. 2 (2025): Infoman's
Publisher : LPPM & Fakultas Teknologi Informasi UNSAP

Show Abstract | Download Original | Original Source | Check in Google Scholar

Abstract

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.