Bubble sort Algorithm (c lang)
By: Himanshu Tiwari
In Bubble Sort algorithm,
1 . traverse from left and compare adjacent elements and the higher one is placed at right side.
2 . In this way, the largest element is moved to the rightmost end at first.
3 . This process is then continued to find the second largest and place it and so on until the data is sorted.
Advantages of Bubble Sort:
Bubble sort is easy to understand and implement.
It does not require any additional memory space.
It is a stable sorting algorithm, meaning that elements with the same key value maintain their relative order in the sorted output.

.png)
nice
ReplyDelete