Skip to content

Category Archives: Algorithms

Given a string S of length N. Select a Subsequence of character, delete it, and concatenate the remaining part of the String S. Let’s say… Read More
In this article, we will discuss the grail sort. Grail sort is a sorting algorithm that was introduced by Vladimir Yaroslavskiy. It is an efficient… Read More
Given two N-digit integers X and Y, the task is to minimize the product of X and Y by performing the following operation any number… Read More
Given two matrices M1[][] and M2[][] of size R * C along with an integer X. In one operation select any cell of M1 let’s… Read More
Given counts of x, y, and z, the task is to find the maximum number of triplets that can be made from the count of… Read More
Given array A[] of size N, array B[] of size M, and integer X, the task for this problem is to tell whether number X… Read More
Given an array arr[] of length N, the task is to check if we can make all elements of the array equal by taking two… Read More
Given an array X[] of odd length N(N ≥ 3) and an integer K. Arrange elements of X[] in such a way that the merged… Read More
Given two positive integers N and K. Create a set of size N containing distinct positive integers such that the sum of no two integers… Read More
Given an array A[], the task is to count the number of XOR-friendly pairs. An XOR-friendly pair is defined as a pair of elements for… Read More
Given an array arr[] of length n which contains positive integers (0 ≤ arr[i] ≤ 109), the task is to count the number of elements… Read More
Given an array nums[] of length N which contains integers, the task is to find a subarray such that the first and the last element… Read More
Given an array arr[], find the maximum sum that can be achieved by picking a subsequence such that the difference between consecutive elements in the… Read More
Given an array arr[] of size n, the task is to find the maximum possible size x of a group such that the difference between… Read More
Given an array X[] of length N along with an integer K. Then the task is to choose a sub-sequence to maximize the sum by… Read More

Start Your Coding Journey Now!