0% Completed
I have 17 years of experience in Programming and Data Science working for big tech companies like NVIDIA and Bloomberg. I also run a famous YouTube channel called Codebasics where I pursue my passion for teaching. Codebasics is one of the top channels on YouTube when it comes to data science, machine learning, data structures, etc. I firmly believe that “Anyone can code” and I use analogies, simple explanations, and step-by-step storytelling to explain difficult concepts in such a way that even a high school student can understand them easily.
Bubble sort is a sorting technique used to sort a list or an array. In data structures and algorithm tutorials, this technique is covered as the most common technique for performing a sorting. It performs sorting in O(n^2) time complexity so it is not the most efficient but it is probably a very simple technique to understand. In this video we will go over theory behind how bubble sort works and implement bubble sort in python. In the end I have an exercise for you to work upon along with a solution link.
Code: https://github.com/codebasics/data-structures-algorithms-python/blob/master/algorithms/2_BubbleSort/bubble_sort.py
Exercise: https://github.com/codebasics/data-structures-algorithms-python/blob/master/algorithms/2_BubbleSort/bubble_sort_exercise.md
New here? Create an account
By logging in, you agree to our Terms and Conditions and Privacy Policy.
Already have an account? Sign in
By continuing, you are agreeing to Codebasics' Terms and Conditions and Privacy Policy.
Please enter the OTP sent to your email ID.