Open Access iconOpen Access

ARTICLE

crossmark

Smart Bubble Sort: A Novel and Dynamic Variant of Bubble Sort Algorithm

by Mohammad Khalid Imam Rahmani

College of Computing and Informatics, Saudi Electronic University, Riyadh, Saudi Arabia

* Corresponding Author: Mohammad Khalid Imam Rahmani. Email: email

Computers, Materials & Continua 2022, 71(3), 4895-4913. https://doi.org/10.32604/cmc.2022.023837

Abstract

In the present era, a very huge volume of data is being stored in online and offline databases. Enterprise houses, research, medical as well as healthcare organizations, and academic institutions store data in databases and their subsequent retrievals are performed for further processing. Finding the required data from a given database within the minimum possible time is one of the key factors in achieving the best possible performance of any computer-based application. If the data is already sorted, finding or searching is comparatively faster. In real-life scenarios, the data collected from different sources may not be in sorted order. Sorting algorithms are required to arrange the data in some order in the least possible time. In this paper, I propose an intelligent approach towards designing a smart variant of the bubble sort algorithm. I call it Smart Bubble sort that exhibits dynamic footprint: The capability of adapting itself from the average-case to the best-case scenario. It is an in-place sorting algorithm and its best-case time complexity is Ω(n). It is linear and better than bubble sort, selection sort, and merge sort. In average-case and worst-case analyses, the complexity estimates are based on its static footprint analyses. Its complexity in worst-case is O(n2) and in average-case is Θ(n2). Smart Bubble sort is capable of adapting itself to the best-case scenario from the average-case scenario at any subsequent stages due to its dynamic and intelligent nature. The Smart Bubble sort outperforms bubble sort, selection sort, and merge sort in the best-case scenario whereas it outperforms bubble sort in the average-case scenario.

Keywords


Cite This Article

APA Style
Khalid Imam Rahmani, M. (2022). Smart bubble sort: A novel and dynamic variant of bubble sort algorithm. Computers, Materials & Continua, 71(3), 4895-4913. https://doi.org/10.32604/cmc.2022.023837
Vancouver Style
Khalid Imam Rahmani M. Smart bubble sort: A novel and dynamic variant of bubble sort algorithm. Comput Mater Contin. 2022;71(3):4895-4913 https://doi.org/10.32604/cmc.2022.023837
IEEE Style
M. Khalid Imam Rahmani, “Smart Bubble Sort: A Novel and Dynamic Variant of Bubble Sort Algorithm,” Comput. Mater. Contin., vol. 71, no. 3, pp. 4895-4913, 2022. https://doi.org/10.32604/cmc.2022.023837



cc Copyright © 2022 The Author(s). Published by Tech Science Press.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 2218

    View

  • 1205

    Download

  • 1

    Like

Share Link