top of page

All of our Articles In One Place
Welcome to our Articles page, where you'll find a wealth of information on a variety of topics. From sorting to math, our of writers have you covered. Browse our collection of articles and learn something new today!


Sparse vs Dense Graphs — Know Your Connections
Imagine two cities. City A has just a few roads connecting important areas. City B has a road between almost every pair of places. Both...
Jul 152 min read


Bipartite Graph — Color It, Don’t Fight It
Let’s say you’re forming two teams from a group of people, where some people just can’t work together . Your job is to split them into...
Jul 121 min read


Kosaraju’s Algorithm — Breaking Down the Graph into Strong Pieces
Let’s say you’re looking at a giant network of cities. You want to find groups of cities where each one is reachable from every other in...
Jul 102 min read


Topological Sort — The “What Comes First” Guide
Let’s say you’re baking a cake 🎂. You must mix ingredients before baking , and you can’t bake before heating the oven . You need a clear...
Jul 101 min read


Floyd-Warshall Algorithm—All Paths, All at Once
Imagine you’re building a global travel app 🌍. You don’t just want the shortest route from A to B— you want the shortest path between...
Jul 51 min read


Bellman-Ford Algorithm—The GPS That Handles Bad Roads Too
Let’s say you're planning a road trip. Some roads give you shortcuts, but others are so bad that they cost you negative time . Dijkstra...
Jul 51 min read


Breadth-First Search (BFS) — Explore Level by Level
While DFS goes deep, Breadth-First Search (BFS) is more social 😄. It explores neighbors level by level , like meeting everyone in your...
Jul 41 min read


Depth-First Search (DFS) — Dive Deep First, Then Backtrack
Ever gone into a maze and kept turning left until you hit a wall, then backtracked to try another path? That’s exactly how Depth-First...
Jul 41 min read


Dijkstra’s Algorithm — Finding the Shortest Path, Smartly
Let’s say you're in a city trying to get to a friend’s house 🚶♂️, and there are many roads with different travel times. You want to get...
Jul 32 min read


Kruskal’s Algorithm — Connect the Dots, But Keep It Cheap
Let’s say you want to build bridges between islands 🏝️, and your goal is to connect all of them with the least cost , without making a...
Jul 32 min read


Prim’s Algorithm: One Step at a Time
Imagine you're building roads to connect a group of villages. You want to make sure every village is connected without spending more...
Jul 22 min read


Majority Element (n/3 times)
Problem Statement: Given an array of integers, find all elements that appear more than n/3 times. The algorithm should run in linear time...
Jul 24, 20241 min read


Merge Two Sorted Arrays Without Extra Space
Problem Statement: Given two sorted arrays arr1 and arr2 of sizes n and m, respectively, merge them in such a way that the resulting...
Jul 24, 20241 min read


Pascals Triangle
Problem Statement: Given an integer numRows, generate the first numRows of Pascal's Triangle. In Pascal's Triangle, each number is the...
Jul 24, 20241 min read


Find the Row with the Maximum Number of 1’s
In this article, we will solve the problem of finding the row with the maximum number of 1’s in a binary matrix. Problem Statement: Given...
Jul 24, 20241 min read


Maximum Sum Path in Two Arrays
In this article, we will solve the problem of finding the sum of the maximum sum path in two sorted arrays having some elements in...
Jul 24, 20242 min read


Print the Matrix in a Spiral Manner
In this article, we will solve the problem of printing a given 2D matrix in a spiral order. Problem Statement: Given a 2D matrix, write a...
Jul 24, 20241 min read


Find Maximum Product Subarray
In this article, we will solve the problem of finding the maximum product subarray within a given array of integers. Problem...
Jul 24, 20241 min read


Rearrange the Array in Alternating Positive and Negative Items
In this article, we will solve the problem of rearranging an array such that positive and negative numbers alternate. If there are extra...
Jul 24, 20241 min read


Count Pairs with the Given Sum
In this article, we will solve the problem of counting the number of pairs in an array that sum up to a given target value. Problem...
Jul 24, 20241 min read
bottom of page
