Merge Sort: A Stable and Efficient Sorting Algorithm

Reading Time: 3 minutes Merge Sort is a powerful sorting algorithm that guarantees a stable and efficient sorting process, even for large datasets. It uses a divide-and-conquer approach, recursively breaking down the array into smaller sub-arrays before merging them back together in sorted order. In this article, I’ll explore how Merge Sort works, provide a detailed implementation, and discuss …

Quick Sort: A Fast and Efficient Sorting Algorithm

Reading Time: 3 minutes Quick Sort is one of the most efficient sorting algorithms, widely used due to its superior performance on large datasets. It employs a divide-and-conquer approach to sort elements by partitioning the array into smaller sub-arrays. This article will explore how Quick Sort works, provide a detailed implementation, and discuss its time and space complexity. How …

Insertion Sort: A Simple Yet Efficient Sorting Algorithm

Reading Time: 3 minutes Insertion Sort is another fundamental sorting algorithm that is intuitive and easy to implement. It works similarly to how you might sort playing cards in your hands: by building a sorted section of the array one element at a time. In this article, I’ll explore how Insertion Sort works, provide a detailed implementation, and discuss …

Selection Sort: A Simple and Effective Sorting Algorithm

Reading Time: 3 minutes Sorting algorithms are crucial in computer science, and Selection Sort is a straightforward yet effective method to arrange elements in order. This article will explore how Selection Sort works, provide a detailed implementation, and discuss its time and space complexity. How Selection Sort Works Selection Sort is a comparison-based sorting algorithm that improves upon Bubble …

Bubble Sort: A Classic Sorting Algorithm

Reading Time: 3 minutes Sorting is a fundamental concept in computer science, and Bubble Sort is one of the simplest and most intuitive sorting algorithms. Despite its simplicity, Bubble Sort provides valuable insights into the basics of sorting and algorithm optimization. In this post, I’ll delve into how Bubble Sort works, provide a detailed implementation, and analyze its time …

Comparing Hot and Cold observables

Reading Time: 5 minutes An observable is a pattern in programming that allows us to subscribe to a stream of data, such as a stream of mouse clicks or a stream of API responses. There are two main types of observables: hot observables and cold observables. Difference between hot and cold observables A hot observable is an observable that …

Promise.all() vs await multiple async functions

Reading Time: 3 minutes Let’s consider two approaches that look really similar and let’s see how they work behind the scenes and which is the most suggested one. Let’s determine the difference by inspecting how each of the two alternatives works. The first approach (sequential) Here, in an async context, we create an array literal. So, when the someFunction1 is called, a …