Back to articles
My Learning Experience with Sorting Algorithms
How-To

My Learning Experience with Sorting Algorithms

via Dev.to TutorialAshiq Omar

During my journey in Data Structures and Algorithms, I explored different sorting techniques and understood how they work under the hood. Sorting is one of the fundamental concepts in programming, and learning it helped me improve my problem-solving skills. In this blog, I’ll share my understanding of various sorting algorithms and what I learned from them. Basic Sorting Algorithms I started with simple sorting methods that are easy to understand but not very efficient for large inputs. Bubble Sort: This algorithm repeatedly compares adjacent elements and swaps them if they are in the wrong order. Easy to implement Not efficient for large datasets Time Complexity: O(n²) Selection Sort: In this method, the smallest element is selected and placed in the correct position during each iteration. Simple logic Performs fewer swaps than bubble sort Time Complexity: O(n²) Insertion Sort: This algorithm builds the sorted array step by step by inserting elements into their correct position. Effic

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
4 views

Related Articles