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!


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...
4 days ago1 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...
4 days ago1 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...
5 days ago2 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...
5 days ago2 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...
6 days ago2 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


Cyclically Rotate an Array by One
In this article, we will solve the problem of cyclically rotating an array by one position to the right. Problem Statement: Given an...
Jul 24, 20241 min read


Chocolate Distribution Problem
In this article, we will look at the problem of distributing chocolate packets among students in such a way that the difference between...
Jul 24, 20241 min read


Minimum Number of Jumps to Reach End
In this article, we will solve the problem of finding the minimum number of jumps required to reach the end of an array. This simply...
Jul 24, 20241 min read


K'th Smallest Element in an Unsorted Array
In this article, we will solve the problem of finding the k'th smallest element in an unsorted array. This means that in an array, we...
Jul 24, 20241 min read


Next Greater Element
In this article, we will solve the problem of finding the next greater element for each element in an array. Problem Statement: Given an...
Jul 17, 20241 min read


Stack Permutations (Check if an Array is a Stack Permutation of Another)
In this article, we will solve the problem of checking if one array is a stack permutation of another. Problem Statement: A stack...
Jul 17, 20242 min read
bottom of page