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!


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


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


Trapping Rainwater
In this article, we will solve the problem of calculating the amount of water that can be trapped after rainfall on a given map...
Jun 5, 20241 min read
0 comments


Stock Buy and Sell
In this article, we will solve the problem of determining the maximum profit that we can get from buying and selling a single stock given...
Jun 5, 20241 min read
0 comments


Find the Repeating and Missing Numbers
In this article, we will solve the problem of finding the repeating and missing numbers in a given array of integers using a hash map. So...
Jun 5, 20241 min read
0 comments


Merge Overlapping Sub-Intervals
In this article, we will solve the problem of merging overlapping sub-intervals. We are given an array of intervals, our task is to merge...
Jun 5, 20241 min read
0 comments


Find the Next Greater Permutation
In this article, our aim is to solve the problem of finding the next greater permutation for the array containing integers. The next...
Jun 5, 20241 min read
0 comments


Sort an Array of 0's, 1's and 2's
In this article, we aim to understand and solve the problem of sorting an array that contains 0, 1, and 2. This problem is also known as...
Jun 5, 20241 min read
0 comments


Maximum Consecutive Ones in an Array
In this article, we will solve the problem of finding the maximum number of consecutive 1s in a binary array that contains only 0s and...
Jun 5, 20241 min read
0 comments


Find the Element that occurs more than N/2 times
In this article, we will be solving a commonly asked question on arrays, which is the Majority Element problem. In this problem, we are...
Jun 4, 20241 min read
0 comments
bottom of page