Sorting Algorithms

Includes common sorting algorithms along with details on how they work, advantages and disadvantages etc.

Below are the list of sorting algorithms published until now:

Introduction to Insertion Sort Algorithm

Have you ever sorted a hand of playing cards? If so, you’ve probably used a method very similar to insertion sort without even realizing it! Insertion sort is one of the simplest and most intuitive sorting algorithms, making it an excellent starting point for learning about sorting algorithms in computer science. Before we understand how insertion sort works, let’s first understand what sorting means and why it is useful.

Read More

Introduction to Bubble Sort Algorithm

Have you ever watched bubbles rise to the surface of a drink? The larger bubbles tend to float up faster while smaller ones take their time. Bubble sort is a type of sorting algorithm which works in a similar way. It is one of the simplest sorting algorithms in computer science, making it a perfect starting point for understanding how sorting works. Before we dive into how Bubble Sort works, let’s first understand what sorting means and why it’s useful.

Read More

Introduction to Selection Sort Algorithm

Have you ever noticed how you naturally sort small items, such as arranging books by height or organizing toys by size? You will probably find the smallest item first, set it aside, then look for the next smallest item, set it aside, and repeat the same process until you pick all the items. Selection sort is an algorithm that works exactly similar to this natural sorting process. It’s one of the most intuitive sorting methods in computer science because it mimics how humans often sort things in real life. Before we get into the technical details, let’s first understand what sorting is all about and why it’s so crucial in computer science.

Read More

Introduction to Merge Sort Algorithm

When it comes to sorting a list of items, whether it’s numbers, names, or any other data, we often think of comparing and rearranging elements one by one. But what if there’s a smarter way to do this? What if we could break the problem into smaller, more manageable pieces, solve them, and then combine the results? This is the core idea behind Merge Sort, one of the most elegant and efficient sorting algorithms. Let’s explore the intuition behind it in a simple, high-level way.

Read More

Introduction to Quick Sort Algorithm

Imagine you have a big collection of books, and you need to arrange them alphabetically by title. One way of doing this is by randomly selecting a book, putting all the books with titles that come before the selected book on one side, and all the books with titles that come after it on the other side. Then, you’d repeat the process with each smaller pile until all the books are in order. That’s the basic idea behind quick sort, a widely used sorting algorithm in computer science. In this article, we’ll understand quick sort algorithm in a simple, beginner-friendly way. Let’s understand what sorting means before we dive into quick sort algorithm.

Read More

Counting Sort Algorithm

Counting sort is an algorithm used to sort (or order) elements present in a list. It counts the number of times each number appears in the input list. The algorithm then iterates through each number from smallest to largest and places them back in the input list. A slightly complicated algorithm also exists which works for any type of input list like arbitrary objects.

Read More

For detailed info, visit https://en.wikipedia.org/wiki/Sorting_algorithm