Python Sorting Algorithm Visualizer Tutorial
Tech With Tim
View ChannelAbout
I'm Tim, a self-taught developer & entrepreneur who brings you educational tech content without the fluff and noise. I went from a broke dropout working at McDonalds to making $100k+/month as a developer, travelling the world and moving to Dubai all before the age of 22. I've since helped thousands of aspiring developers land their first software engineering role and assisted mid-level devs land jobs at companies like google. Max landed his first developer job 3 weeks after going through my training. Youssef was laid off and landed a new role in 2 months while working with me. Jamario landing competing job offers before graduating college. If you want to learn more you can click the first link and watch my free training on how we help developers who already know how to code get hired by top tech companies.
Latest Posts
Video Description
Welcome back to another video! In todays video I'm going to be showing you to create a sorting algorithm visualizer in Python using Pygame! I have a quick demo that you can see and I will also talk about some of the prerequisites as this is not a beginner tutorial. I hope that you enjoy! 💻 ProgrammingExpert is the best platform to learn how to code and become a software engineer as fast as possible! Check it out here: https://programmingexpert.io/tim and use code "tim" for a discount! 📄 Resources 📄 Code in this video: https://github.com/techwithtim/Sorting-Algorithm-Visualizer Python Generators Explained: https://www.youtube.com/watch?v=u3T7hmLthUU Fix Pip (Windows): https://www.youtube.com/watch?v=AdUZArA-kZw&t=204s Fix Pip (Mac): https://www.youtube.com/watch?v=E-WhAS6qzsU ⭐️ Timestamps ⭐️ 00:00:00 | Overview 00:00:27 | Project Demo 00:01:49 | Prerequisites 00:02:46 | Pygame Setup 00:03:35 | DrawInformation Class 00:15:15 | Generating Starting List 00:16:50 | Pygame Event Loop 00:23:00 | Drawing On The Screen 00:34:03 | Sorting Controls 00:45:06 | Implementing Bubble Sort 01:05:10 | Cosmetic Additions 01:08:48 | Implementing Insertion Sort 01:14:54 | Conclusion ◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️ 👕 Merchandise: https://teespring.com/stores/tech-with-tim-merch-shop 📸 Instagram: https://www.instagram.com/tech_with_tim 📱 Twitter: https://twitter.com/TechWithTimm ⭐ Discord: https://discord.gg/twt 📝 LinkedIn: https://www.linkedin.com/in/tim-ruscica-82631b179/ 🌎 Website: https://techwithtim.net 📂 GitHub: https://github.com/techwithtim 🔊 Podcast: https://anchor.fm/tech-with-tim 🎬 My YouTube Gear: https://www.techwithtim.net/gear/ 💵 One-Time Donations: https://www.paypal.com/donate?hosted_button_id=CU9FV329ADNT8 💰 Patreon: https://www.patreon.com/techwithtim ◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️ ⭐️ Tags ⭐️ -Tech With Tim -Sorting Algorithm -Python -Visualizer ⭐️ Hashtags ⭐️ #TechWithTim #Python #Visualizer
iPhone 13 Upgrade Essentials
AI-recommended products based on this video
![VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung](https://m.media-amazon.com/images/I/71bHSP1cRkL._AC_UL960_FMwebp_QL65_.jpg)
VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung
![iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad](https://m.media-amazon.com/images/I/517jTqwo1nL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad
![iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods](https://m.media-amazon.com/images/I/71xZOlUELbL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, Personalized Spatial Audio, Sweat- and Water-Resistant, USB-C Charging Case, H2 Chip, Up to 30 Hours of Battery Life

Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Wireless Charger for iPhone- 3 in 1 Charging Station for iPhone 16/15/14/13/12/Pro Max/Pro/Mini/Plus, Apple Watch 10/9/8/7/SE/6/5/4/3/2/1/Ultra2/Ultra, AirPods pro/2/3/4

3 in 1 Foldable Charging Station for Apple Wireless Charger for iPhone 16 15 14 13 12 11 Series, Wireless Charging Station with Night Light for Apple Watch Charger for AirPods 4/3/2/Pro/Pro 2 (Black)

Anker 332 USB-C Hub (5-in-1) with 4K HDMI Display, 5Gbps - and 2 5Gbps USB-A Data Ports and for MacBook Pro, MacBook Air, Dell XPS, Lenovo Thinkpad, HP Laptops and More
![Spigen Case for Galaxy S25 Case, Tough Armor (Ai) MagFit [Wireless Charging] Compatible with MagSafe - Black](https://m.media-amazon.com/images/I/71dL2NiwINL._AC_UL960_FMwebp_QL65_.jpg)
Spigen Case for Galaxy S25 Case, Tough Armor (Ai) MagFit [Wireless Charging] Compatible with MagSafe - Black

Spigen Case for iPhone 16 Case, Tough Armor Designed for Apple iPhone 16 - Black
![Spigen Case for iPhone 16 Pro Case, Tough Armor [MagFit] Compatible with MagSafe - Black](https://m.media-amazon.com/images/I/61rMnLID99L._AC_UL960_FMwebp_QL65_.jpg)
Spigen Case for iPhone 16 Pro Case, Tough Armor [MagFit] Compatible with MagSafe - Black
![Spigen Case for iPhone 16 Plus Case, Tough Armor (AI) [MagFit] Compatible with MagSafe - Black](https://m.media-amazon.com/images/I/61Ygh697e4L._AC_UL960_FMwebp_QL65_.jpg)
Spigen Case for iPhone 16 Plus Case, Tough Armor (AI) [MagFit] Compatible with MagSafe - Black
![MRGLAS 2025 Upgraded Magsafe Car Mount Vacuum Suction Magnetic Phone Holder Car, 360° Foldable Adjustable Suction Cup Phone Stand [89+LBS Suction & 2800gf Magnetic] for Car Accessories iPhone17/16](https://m.media-amazon.com/images/I/71UbeT7ccLL._AC_UL960_FMwebp_QL65_.jpg)
MRGLAS 2025 Upgraded Magsafe Car Mount Vacuum Suction Magnetic Phone Holder Car, 360° Foldable Adjustable Suction Cup Phone Stand [89+LBS Suction & 2800gf Magnetic] for Car Accessories iPhone17/16

for Magsafe Car Mount【20 Strong Magnets 】Magnetic Phone Holder for Car Phone Holder Mount Dash【360°】Cell Phone Mount for Car Accessories,Car Mount for iPhone 16 Pro Max 15 14 13 12 Plus MagSafe Cases
![Aioneus iPhone Charger [Apple MFi Certified] 6FT USB Charger Cable Fast Charging USB to Lightning Cable Braided Cord Compatible with iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad](https://m.media-amazon.com/images/I/51ZEZjLgr2L._AC_UL1500_FMwebp_QL65_.jpg)
Aioneus iPhone Charger [Apple MFi Certified] 6FT USB Charger Cable Fast Charging USB to Lightning Cable Braided Cord Compatible with iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad
![iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad](https://m.media-amazon.com/images/I/517jTqwo1nL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad

iPhone Charger Cord Lightning Cable (Apple MFi Certified) 6/6/10ft 3 Pack iPhone Cable Fast Charging Long Apple Charger Cable for iPhone 13 13 Pro 12 Pro 11 SE Max XS XR X, iPad Mini Air, iPod, AirPod
![5 Pack [MFi Certified] iPhone Charger 3ft,USB to Lightning Cable 3 Foot,Original Fast iPhone Charging Cord for iPhone 14 Pro Max/iPhone 13 Pro/12 Pro Max/12/11/Se2022/XR/X/8/iPad, White](https://m.media-amazon.com/images/I/71dLb64qYLL._AC_UL960_FMwebp_QL65_.jpg)



