Summary notes on topic "Sorting"
-------------------++++++++-----------
• The process of placing or rearranging a collection of elements into a particular order is known as sorting.
• Bubble sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements in case they are unordered in n-1 passes.
• In Selection Sort, the smallest element is selected from the unsorted array and swapped with the leftmost element, and that element becomes a part of the sorted array. The process continues for the next element in the unsorted array till the list is sorted.
• Insertion Sort places the element of a list at its suitable place in each pass. It is similar to the placing of cards at its right position while playing cards.
• Complexity analysis is performed to explain how an algorithm will perform when the input grows larger.