# 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