A Review of Algorithms’s Complexities on Different Valued Sorted and Unsorted Data
Attia Shabbir, Asad Majeed, Mahnoor Iftikhar, Raja Hashim Ali, Usama Arshad, Muhammad Zeeshan Shabbir, Ali Zeeshan Ijaz, Nisar Ali, Ali Aftab
Abstract
Sorting and searching are critical processes for effecttive data analysis. In this paper, we evaluate the performance of various sorting and searching algorithms and compare their time and space complexities on both sorted and unsorted data. The algorithms we analyzed include six common sorting algorithms (insertion, radix, bucket, merge, bubble, and quick sort) and three search algorithms (linear, binary, and jump search). The results of our study provide insights into the best algorithms to use for different input sizes and types of data. It was found that for small input sizes, all algorithms perform similarly, but for larger input sizes, insertion and radix sorts are better for time complexity while bubble sort is better for space complexity. Additionally, jump search outperformed linear and binary search algorithms in both time and space complexity. Besides, difference between time and space complexity of sorted and unsorted data was significant.