Title: An Artificial Intelligence-Based Hybrid Framework for Adaptive Sorting in Real-Time Supply Chain Automation
Authors: Deema Abdalla Shaqfa, Samy S. Abu-Naser
Volume: 10
Issue: 7
Pages: 63-73
Publication Date: 2026/07/28
Abstract:
Sorting is a fundamental operation in computer science, used in databases, search engines, and machine learning. Classical sorting algorithms like QuickSort have been widely adopted due to their average-case efficiency. However, QuickSort suffers from a critical limitation: its worst-case time complexity degrades to O(nē) when a poor pivot is selected, particularly on sorted, reverse sorted, or nearly sorted data. Traditional pivot selection strategies rely on fixed rules that do not adapt to input characteristics. This paper proposes a hybrid approach that enhances QuickSort using a simple machine learning model for adaptive pivot selection. The method extracts statistical features from a small random sample of size ?n, including distribution pattern, degree of sortedness, value range, and duplicate ratio. A lightweight classifier, trained offline, predicts a pivot position that leads to balanced partitions. We expect our approach to achieve 25-35% improvement on sorted and reverse sorted data, 20-25% on nearly sorted data, and 10-15% on duplicate-rich data, with only 1-2% overhead. The model is simple, easy to implement, and can be extended to other sorting algorithms.