Bubble Sort Explained
New tech Code New tech Code
191 subscribers
35 views
0

 Published On Jul 16, 2023

Bubble Sort Explained / Bubble Sort Visualization / Bubble Sort Python / Insertion Sort Time Complexity

In this video, I explained Bubble Sort Algorithm, which is a popular sorting algorithm. In this algorithm, you take the first element and compare it with its next element. If the first element is bigger than the next one, then swap them. After that, go to the next one and compare it with its next one. If the second element is bigger than the third one, then swap it; otherwise, do nothing. Now, keep doing it until you have the biggest element at the end of the array. Now you can decrease the length of the array by 1, and then you have a new array. Just repeat the same process until you have a sorted array. Now, I had opened my favorite IDE and coded it using the power of Python. An important thing to note is that the best time complexity is O(n), but the worst time complexity is O(n^2).

If you find this video informative or entertaining, please like, share, and subscribe. Additionally, share your feedback so that I can make improvements.

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗ ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣ ╠╗║╚╝║║╠╗║╚╣║║║║║═╣ ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝


GithubCodeLink:-https://github.com/Deepjyotikar13/Sor...

THANK YOU
FOR WATCHING
Like,Share, Subscribe

#bubblesort #python #sortingalgorithms #sortingalgorithm #timecomplexity

show more

Share/Embed