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!
DSA


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


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
0 comments


Find Maximum Difference Between Nearest Left and Right Smaller Elements
In this article, we will solve the problem of finding the maximum absolute difference between the nearest left and right smaller elements...
Jul 17, 20242 min read
0 comments


Check for Balanced Parenthesis
In this article, we will solve the problem of checking if a string has balanced parentheses. Problem Statement:Â Given a string containing...
Jul 17, 20241 min read
0 comments


Implementing a Stack Using a Queue
In this article, we will learn how to implement a stack data structure using a single queue. Problem Statement:Â Implement a stack using a...
Jul 17, 20241 min read
0 comments


Implementing a Stack using Arrays
In this article, we will learn how to implement a stack data structure using arrays. Problem Statement:Â Implement a stack using an array...
Jul 17, 20241 min read
0 comments


Find Minimum Number of Coins to Make a Given Value (Coin Change)
In this article, we will solve the problem of finding the minimum number of coins needed to make a given value. Problem Statement:Â We are...
Jun 17, 20242 min read
0 comments
bottom of page