My Journey Through Sorting Algorithms
Over the past few sessions, I got hands-on experience with different sorting algorithms, and honestly, it felt like slowly uncovering how computers “think” when organizing data. What started as simple concepts turned into deeper insights about efficiency, memory, and problem-solving. This was my sta
Jeyaprasad R
Over the past few sessions, I got hands-on experience with different sorting algorithms, and honestly, it felt like slowly uncovering how computers “think” when organizing data. What started as simple concepts turned into deeper insights about efficiency, memory, and problem-solving.
📅 Day 07: Bubble Sort & Selection Sort
This was my starting point with sorting algorithms, and it helped me build a strong foundation.
🔹 Bubble Sort
Bubble Sort works by repeatedly comparing adjacent elements and swapping them if they’re in the wrong order.
At first, it felt very intuitive—almost like manually sorting numbers step by step.
💡 What I understood:
- Easy to implement and visualize
- Not efficient for large datasets (O(n²))
- Good for learning, not for real-world use
🔹 Selection Sort
Selection Sort takes a slightly different approach. It finds the smallest element and places it in the correct position.
💡 My takeaway:
- Fewer swaps compared to Bubble Sort
- Still not very efficient (O(n²))
- Helped me understand how selection-based logic works
📅 Day 08: Insertion Sort
Insertion Sort felt more “natural” to me—like arranging playing cards in your hand.
Instead of swapping randomly, it builds a sorted portion step by step.
💡 What stood out:
- Works well for small or nearly sorted data
- Still has O(n²) complexity in worst case
- More efficient than Bubble and Selection in practice
This was the point where I started seeing how different approaches can impact performance.
📅 Day 09: Merge Sort + Real-World Connection
This session was a big jump—from basic to more advanced thinking.
🔹 Merge Sort
Merge Sort uses a divide-and-conquer strategy:
- Break the array into smaller parts
- Sort each part
- Merge them back together
💡 My understanding:
- Much faster (O(n log n))
- Works consistently well
- Requires extra memory
It made me realize how breaking problems into smaller pieces can make them easier to solve.
🧠 Final Reflection
These three days completely changed how I look at sorting:
- Day 07 gave me the basics
- Day 08 showed me smarter ways to sort
- Day 09 introduced efficiency and real-world connections
Found this useful? Share it!
Read the Full Story
Continue reading on Dev.to
Related Stories
Majority Element
about 2 hours ago
Building a SQL Tokenizer and Formatter From Scratch — Supporting 6 Dialects
about 2 hours ago
Markdown Knowledge Graph for Humans and Agents
about 2 hours ago

Moving Beyond Disk: How Redis Supercharges Your App Performance
about 2 hours ago