"Merge & Bubble Sort Algorithms"
A sorting algorithm will put things in order for you, for example alphabetical or numerical order. For example the customer name will be put in alphabetical order by surname, or a list of people can be put depending on their age. It can take a long time therefore to create a large list.
Bubble Sort:
In bubble sort you compare two sorts of data depending on their size, you compare them and if one is bigger than the other you switch them so as the order of data is continuous. For example:
Merge Sort:
The idea behind the merge sort is that it uses two different lists and merges them quicker into a sequence to make it continuos. It is much quicker.
A sorting algorithm will put things in order for you, for example alphabetical or numerical order. For example the customer name will be put in alphabetical order by surname, or a list of people can be put depending on their age. It can take a long time therefore to create a large list.
Bubble Sort:
In bubble sort you compare two sorts of data depending on their size, you compare them and if one is bigger than the other you switch them so as the order of data is continuous. For example:
Merge Sort:
The idea behind the merge sort is that it uses two different lists and merges them quicker into a sequence to make it continuos. It is much quicker.
Comments
Post a Comment