commit 948071d531ece2c6573de7a244c0e115fafefad7 Author: Harshil Date: Tue Sep 6 18:18:31 2016 +0530 Initial Home page diff --git a/Sorting-Algorithms.md b/Sorting-Algorithms.md new file mode 100644 index 0000000..16288be --- /dev/null +++ b/Sorting-Algorithms.md @@ -0,0 +1,7 @@ +## Bubble sort: + +![bubblesort](https://camo.githubusercontent.com/40b8099e638526dce298f8dc91246173d56e389a/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f7468756d622f382f38332f427562626c65736f72742d6564697465642d636f6c6f722e7376672f32323070782d427562626c65736f72742d6564697465642d636f6c6f722e7376672e706e67) + +**Bubble sort**, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. The algorithm, which is a comparison sort, is named for the way smaller elements "bubble" to the top of the list. Although the algorithm is simple, it is too slow and impractical for most problems even when compared to insertion sort. It can be practical if the input is usually in sorted order but may occasionally have some out-of-order elements nearly in position.
+**read more at: [Wikipedia](https://en.wikipedia.org/wiki/Bubble_sort)**
+**code: [Bubble sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/bubble_sort.py)**