Coding Challenge #114: Bubble Sort Visualization

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=67k3I2GxTH8



Duration: 17:13
428,947 views
9,193


Yes, sorting numbers can be fun! In this challenge I attempt to implement the "bubble sort" algorithm in Processing (Java) and visualize the process itself with animated lines. Code: https://thecodingtrain.com/challenges/114-bubble-sort-visualization

(πŸ€–πŸ€–πŸ€–Correction: At 3:53 I incorrectly state that N's growth is exponential, I should have said "quadratic" or "polynomial".)

πŸ•ΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/3HVrL9m36

πŸŽ₯ Previous video: https://youtu.be/XE3YDVdQSPo?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Next video: https://youtu.be/OMoVcohRgZA?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
πŸ““ Visualizing Algorithms: https://bost.ocks.org/mike/algorithms/

Live Stream Archive:
πŸ”΄ Coding Train Live 149: https://youtu.be/mfOL2RIyk2c?t=12543s

Related Coding Challenges:
πŸš‚ #47 Pixel Sorting in Processing: https://youtu.be/JUDYkxU6J0o
πŸš‚ #143 Quicksort Visualization: https://youtu.be/eqo2LxRADhU

Timestamps:
0:00 Introducing today's topic
1:50 What is a bubble sort?
4:10 Visualizing the array
6:17 Write the sorting algorithm
8:19 Write the swap function
9:30 Animate the sort
12:52 Speed up the sorting
16:41 Conclusion and suggestions

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

πŸš‚ Website: http://thecodingtrain.com/
πŸ‘Ύ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
πŸ’‘ GitHub: https://github.com/CodingTrain
πŸ’¬ Discord: https://thecodingtrain.com/discord
πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: https://standard.tv/codingtrain
πŸ–‹οΈ Twitter: https://twitter.com/thecodingtrain
πŸ“Έ Instagram: https://www.instagram.com/the.coding.train/

πŸŽ₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: https://p5js.org
πŸ”— p5.js Web Editor: https://editor.p5js.org/
πŸ”— Processing: https://processing.org

πŸ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#bubblesortalgorithm #processing







Tags:
programming
daniel shiffman
tutorial
coding
the coding train
nature of code
processing
sort
sorting
sorting algorithm
bubble sort
selection sort
sort processing
bubble sort visualization
visualizing bubble sort
bubble sorting
big o
big o notation
bubble sorting algorithm
bubble sort algorithm
selection sort java
selection sort algorithm
bubble sort java
bubble sort algorithm visualization