Bubble Sort Algorithm Explained (Full Code Included) - Python Algorithms Series for Beginners
Bubble Sort is a simple sorting algorithm that repeatedly swaps two adjacent elements through iterations through the list length to create a sort list.
The Bubble sort algorithm is one of the simplest algorithms to learn in computer science and is a great starting point to learn tougher algorithms.
In this one we'll cover how to implement the bubble sort algorithm using python programming.
#Python #BubbleSort #Algorithm
Join The Socials -- Picking Shoutouts Across YouTube, Insta, FB, and Twitter!
FB - https://www.facebook.com/CodeWithDerrick/
Insta - https://www.instagram.com/codewithderrick/
Twitter - https://twitter.com/codewithderrick
LinkedIn - https://www.linkedin.com/in/derricksherrill/
GitHub - https://github.com/Derrick-Sherrill
Thanks so much for the continued support of the videos! 5320+ subscribers at the time of writing. So awesome. Thank you all for supporting the content I make! It's incredible to get the opportunity to make these videos for you all. Thanks so much!
*****************************************************************
Full code from the video:
def bubble(list_a):
indexing_length = len(list_a) - 1 #SCan not apply comparision starting with last item of list (No item to right)
sorted = False #Create variable of sorted and set it equal to false
while not sorted: #Repeat until sorted = True
sorted = True # Break the while loop whenever we have gone through all the values
for i in range(0, indexing_length): # For every value in the list
if list_a[i] #"Angled brackets not allowed in Youtube Description :( list_a[i+1]: #if value in list is greater than value directly to the right of it,
sorted = False # These values are unsorted
list_a[i], list_a[i+1] = list_a[i+1], list_a[i] #Switch these values
return list_a # Return our list "unsorted_list" which is not sorted.
print(bubble([4,8,1,14,8,2,9,5,7,6,6]))
https://github.com/Derrick-Sherrill/Python-Algorithms-YouTube-Series/blob/master/1-bubblesort.py
Packages (& Versions) used in this video:
Python 3.7
*****************************************************************
Code from this tutorial and all my others can be found on my GitHub:
https://github.com/Derrick-Sherrill/DerrickSherrill.com
Check out my website:
https://www.derricksherrill.com/
If you liked the video - please hit the like button. It means more than you know. Thanks for watching and thank you for all your support!!
--- Channel FAQ --
What text editor do you use?
Atom - https://atom.io/
What Equipment do you use to film videos?
https://www.amazon.com/shop/derricksherrill
What editing software do you use?
Adobe CC - https://www.adobe.com/creativecloud.html
Premiere Pro for video editing
Photoshop for images
After Effects for animations
Do I have any courses available?
Yes & always working on more!
https://www.udemy.com/user/derrick-sherrill-2/
Where do I get my music?
I get all my music from the copyright free Youtube audio library
https://www.youtube.com/audiolibrary/music?nv=1
Let me know if there's anything else you want answered!
-------------------------
Always looking for suggestions on what video to make next -- leave me a comment with your project! Happy Coding!
Видео Bubble Sort Algorithm Explained (Full Code Included) - Python Algorithms Series for Beginners канала Derrick Sherrill
The Bubble sort algorithm is one of the simplest algorithms to learn in computer science and is a great starting point to learn tougher algorithms.
In this one we'll cover how to implement the bubble sort algorithm using python programming.
#Python #BubbleSort #Algorithm
Join The Socials -- Picking Shoutouts Across YouTube, Insta, FB, and Twitter!
FB - https://www.facebook.com/CodeWithDerrick/
Insta - https://www.instagram.com/codewithderrick/
Twitter - https://twitter.com/codewithderrick
LinkedIn - https://www.linkedin.com/in/derricksherrill/
GitHub - https://github.com/Derrick-Sherrill
Thanks so much for the continued support of the videos! 5320+ subscribers at the time of writing. So awesome. Thank you all for supporting the content I make! It's incredible to get the opportunity to make these videos for you all. Thanks so much!
*****************************************************************
Full code from the video:
def bubble(list_a):
indexing_length = len(list_a) - 1 #SCan not apply comparision starting with last item of list (No item to right)
sorted = False #Create variable of sorted and set it equal to false
while not sorted: #Repeat until sorted = True
sorted = True # Break the while loop whenever we have gone through all the values
for i in range(0, indexing_length): # For every value in the list
if list_a[i] #"Angled brackets not allowed in Youtube Description :( list_a[i+1]: #if value in list is greater than value directly to the right of it,
sorted = False # These values are unsorted
list_a[i], list_a[i+1] = list_a[i+1], list_a[i] #Switch these values
return list_a # Return our list "unsorted_list" which is not sorted.
print(bubble([4,8,1,14,8,2,9,5,7,6,6]))
https://github.com/Derrick-Sherrill/Python-Algorithms-YouTube-Series/blob/master/1-bubblesort.py
Packages (& Versions) used in this video:
Python 3.7
*****************************************************************
Code from this tutorial and all my others can be found on my GitHub:
https://github.com/Derrick-Sherrill/DerrickSherrill.com
Check out my website:
https://www.derricksherrill.com/
If you liked the video - please hit the like button. It means more than you know. Thanks for watching and thank you for all your support!!
--- Channel FAQ --
What text editor do you use?
Atom - https://atom.io/
What Equipment do you use to film videos?
https://www.amazon.com/shop/derricksherrill
What editing software do you use?
Adobe CC - https://www.adobe.com/creativecloud.html
Premiere Pro for video editing
Photoshop for images
After Effects for animations
Do I have any courses available?
Yes & always working on more!
https://www.udemy.com/user/derrick-sherrill-2/
Where do I get my music?
I get all my music from the copyright free Youtube audio library
https://www.youtube.com/audiolibrary/music?nv=1
Let me know if there's anything else you want answered!
-------------------------
Always looking for suggestions on what video to make next -- leave me a comment with your project! Happy Coding!
Видео Bubble Sort Algorithm Explained (Full Code Included) - Python Algorithms Series for Beginners канала Derrick Sherrill
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Selection Sort Algorithm Explained (Full Code Included) - Python Algorithms Series for Beginners](https://i.ytimg.com/vi/4CykZVqBuCw/default.jpg)
![](https://i.ytimg.com/vi/1fgO8n3wxT8/default.jpg)
![Bubble Sort in Plain English](https://i.ytimg.com/vi/uJLwnsLn0_Q/default.jpg)
![Programmatically Combine Excel Worksheets on Certain Columns - Five Minute Python Scripts](https://i.ytimg.com/vi/MqA0ZNP0EDQ/default.jpg)
![Bubble sort in 2 minutes](https://i.ytimg.com/vi/xli_FI7CuzA/default.jpg)
![Bubble Sort - Data Structures & Algorithms Tutorial Python #14](https://i.ytimg.com/vi/ppmIOUIz4uI/default.jpg)
![Why Computers Can't Count Sometimes](https://i.ytimg.com/vi/RY_2gElt3SA/default.jpg)
![Quick Sort Algorithm Explained (Full Code Included) - Python Algorithm Series for Beginners](https://i.ytimg.com/vi/kFeXwkgnQ9U/default.jpg)
![#70 Python Tutorial for Beginners | Bubble Sort in python | List Sort](https://i.ytimg.com/vi/Vca808JTbI8/default.jpg)
![you need to learn Python RIGHT NOW!! // EP 1](https://i.ytimg.com/vi/mRMmlo_Uqcs/default.jpg)
![Binary Search Algorithm Explained (Full Code Included) - Python Algorithms Series for Beginners](https://i.ytimg.com/vi/DnvWAd-RGhk/default.jpg)
![Insertion Sort vs Bubble Sort + Some analysis](https://i.ytimg.com/vi/TZRWRjq2CAg/default.jpg)
![Replace Excel Vlookup with Python - Five Minute Python Scripts](https://i.ytimg.com/vi/cRELNmDpaks/default.jpg)
![Insertion Sort Algorithm Made Simple [Sorting Algorithms]](https://i.ytimg.com/vi/nKzEJWbkPbQ/default.jpg)
![Automate Multiple Sheet Excel Reporting - Python Automation Tutorial | Full Code Walk Through (2019)](https://i.ytimg.com/vi/1Kcco6koC34/default.jpg)
![Insertion Sort Algorithm Explained (Full Code Included) - Python Algorithm Series for Beginners](https://i.ytimg.com/vi/byHi41L9vTM/default.jpg)
![Merge Sort In Python Explained (With Example And Code)](https://i.ytimg.com/vi/cVZMah9kEjI/default.jpg)
![Level Up Python Pandas GroupBy | Five Minute Python Scripts | Subscriber Request](https://i.ytimg.com/vi/F1KYHydTetc/default.jpg)
![Python Pandas Tutorial ( Basics ) - Start Replacing Excel for Python 2021 Series](https://i.ytimg.com/vi/F-gDgQ6kuuk/default.jpg)
![Intro to Sorting Algorithms in Python - Bubble Sort](https://i.ytimg.com/vi/KLvH6yi5YYU/default.jpg)