Summary
Keywords
Full Transcript
Here is a detailed video on Selection Sort Algorithm and Bubble Sort Algorithm in data structure. We at Scaler simplify these two sorting algorithms and techniques with clear-cut easy to understand examples. Join our FREE Masterclass: https://bit.ly/3rpqcXg Sorting helps to search for data elements in a quick manner. Sorting techniques like bubble sort and selection sort are quite helpful in Java and C++. 🔹 What is selection sort? A sorting algorithm in data structure that takes the smallest value in the list and moves it into the proper position. The selection sort algorithm is more efficient and faster when compared to bubble sort. If memory write is a costly operation, the selection sort can come in handy as it never makes more than more than 0(n) swaps. The time complexity for selection sort is 0(n2). 🔹 What is bubble sort? A sorting algorithm that continuously moves through the array and compares the adjacent pairs to sort the elements. It is slower and less efficient when compared to selection sort. Due to its simplicity, bubble sort is often used to introduce sorting algorithms. Bubble sort time complexity for average and worst case is 0(n2) whereas it is 0(n) for the best case. We have covered the following topics in the video 👇🏼 3:02 What is bubble sort? 6:30 Pseudocode for bubble sort example 9:51 What is selection sort? 10:46 Best case order N for bubble sort 12:16 Best case order N for selection sort 15:23 Pseudocode for the selection sort ---------------------------------------- About Scaler -------------------------------------------------- We are a tech-focused upskilling and reskilling platform catering to tech enthusiasts in universities and working professionals. There are more Scaler graduates working at Amazon than all of the IITs combined! Learn more about Scaler: https://bit.ly/2TsmEH3 📌 Follow us on Social and be a part of an amazing tech community📌 👉 Meet like-minded coder folks on Discord - https://discord.com/invite/ejFeksEtTq 👉 Tweets you cannot afford to miss out on - https://twitter.com/scaler_official 👉 Check out student success stories, expert opinions, and live classes on Linkedin - https://www.linkedin.com/school/scalerofficial 👉 Explore relatable memes and get access to exclusive updates on Instagram - https://www.instagram.com/scaler_official/ 📢 Be a part of our one of a kind telegram community: https://t.me/Scalercommunity 🔔 Hit that bell icon to get notified of all our new videos 🔔 If you liked this video, please don't forget to like and comment. Never miss out on our exclusive videos to help boost your coding career! Subscribe to Scaler now! https://www.youtube.com/Scaler?sub_confirmation=1 #bubblesort #selectionsort #codingforbeginners
