Closed abhianand0110 closed 3 years ago
@abhianand0110 I am merging your code, so it can help other, but as we were merging algorithms and coding tasks at a basic level. Our repo has been reported by someone and it is no longer being valid. :(
So this PR will not bt counted for the fest :)
Read more at - #294
Bubble sort algorithm is the bubble sorting algorithm. The most important reason for calling the bubble is that the largest number is thrown at the end of this algorithm. This is all about the logic. In each iteration, the largest number is expired and when iterations are completed, the sorting takes place. Bubble Sort Algorithm Analysis (Best Case - Worst Case - Average Case) Bubble Sort Worst Case Performance is O (n²). Why is that? Because if you remember Big O Notation, we were calculating the complexity of the algorithms in the nested loops. The n * (n - 1) product gives us O (n²) performance. In the worst case all the steps of the cycle will occur. Bubble Sort (Avarage Case) Performance. Bubble Sort is not an optimal algorithm. in average, O (n²) performance is taken. Bubble Sort Best Case Performance. O (n).