Skip to content

Category Archives: Algorithms

Given an integer array A[] of size N, the task is to check if the array can be divided into two subsequences such that appending… Read More
Given an array arr[] of size N. The task is to make all the array elements equal to zero by applying the minimum number of… Read More
Given a binary tree and a target K, the task is to find the diameter of the minimum subtree having sum equal to K which… Read More
Given an array arr[] which is of 3*N size, the task is to remove N elements and divide the whole array into two equal parts… Read More
There have always been arguments about how can be a sorting algorithm of linear time complexity be achieved, as all the traditional sorting algorithms are… Read More
 Given an array arr[] of distinct elements size N that is sorted and then around an unknown point, the task is to count the number… Read More
Given two arrays, array A[] of size N and array B[] of size N-1, array A has all the positive elements and -1 for the… Read More
Given a binary string S of length N, the task is to find the minimum number of removals to segregate all the 0s and all… Read More
In certain sorting problems, if the data is already sorted the complexity of the sorting algorithm changes. That is it can be said that the… Read More
Given a weighted directed graph with N vertices and M edges, a source src and a destination target, the task is to find the shortest… Read More
Given a positive integer N, the task is to find the largest possible value of N after any number of swaps is made between digits… Read More
Given an array arr[] of size N and a given difference diff, the task is to count the number of partitions that we can perform… Read More
Given a matrix of size N * N containing only 0s and 1s, where 0 represents white and 1 represents black. The task is to… Read More
Given an array A[] containing N elements and an array queries containing Q queries of type [ X, L, R ] where X is the… Read More
Given an array A[] of size N. The task is to find the minimum value that should be added to the array elements to maximize… Read More

Start Your Coding Journey Now!