Abstract

ABSTRACT Sorting a list of items is one basic task in many applications used on the computer. The term describes the arrangement of a set of items in a certain order to make analysis and processing very easy. Numerous sorting algorithms exist however its efficiency and memory space consumption become a major issue when it has to be implemented.Essentially, programmers select sort algorithms that perform well even as the size of the input data increases. In this study, a new algorithm, Magnetic Bubble Sort Algorithm (MBS) is proposed. The MBS is an enhancement of the bubble sort algorithm which offers a far better performance in the case where redundancies occur in the list. The run time of the MBS depends on the number of distinct values that are found in the list to be sorted.The improved bubble sort algorithm is very simple to analyse, considering the fact that the time complexity of the algorithm depends on two main factors that is the size of list (n) and number of distinct values in the list.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call