A Comparative Study of Sorting Algorithms Based on Time Complexity and Runtime

This study presents a comparative performance analysis of six fundamental sorting algorithms: Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, and Heap Sort. The algorithms were implemented in Python and evaluated using different input sizes ranging from 1,000 to 20,000 elements. Three types of datasets were considered: random, already sorted, and reverse-sorted data. Execution time was measured using Python's time.perf_counter() function, and the average runtime was calculated over three trials. The experimental results demonstrate how theoretical time complexity relates to practical execution performance. Quick Sort performed particularly well on random datasets but experienced significant slowdown on sorted and reverse-sorted inputs due to its fixed pivot selection. Insertion Sort performed efficiently on already sorted datasets. The study highlights the importance of input characteristics when selecting an appropriate sorting algorithm.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-15
DOI
https://doi.org/10.5281/zenodo.24244560
Primary Topic
Algorithms and Data Compression
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

A Comparative Study of Sorting Algorithms Based on Time Complexity and Runtime

Ayush
Zenodo (CERN European Organization for Nuclear Research)
Algorithms and Data Compression
preprint

A Comparative Study of Sorting Algorithms Based on Time Complexity and Runtime

Ayush
preprint en

Abstract

This study presents a comparative performance analysis of six fundamental sorting algorithms: Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, and Heap Sort. The algorithms were implemented in Python and evaluated using different input sizes ranging from 1,000 to 20,000 elements. Three types of datasets were considered: random, already sorted, and reverse-sorted data. Execution time was measured using Python's time.perf_counter() function, and the average runtime was calculated over three trials. The experimental results demonstrate how theoretical time complexity relates to practical execution performance. Quick Sort performed particularly well on random datasets but experienced significant slowdown on sorted and reverse-sorted inputs due to its fixed pivot selection. Insertion Sort performed efficiently on already sorted datasets. The study highlights the importance of input characteristics when selecting an appropriate sorting algorithm.

Zenodo (CERN European Organization for Nuclear Research)
Algorithms and Data Compression
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon