Skip to content

Category Archives: Data Structures

Given a Matrix of size M * N (0-indexed) and an integer K, the matrix contains distinct integers only, the task is to sort the… Read More
A matrix represents a collection of numbers arranged in an order of rows and columns. It is necessary to enclose the elements of a matrix… Read More
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 a string S of length N and 2 integers X and Y, the task is to find the minimum cost of converting the string… 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 a string S that contains only lowercase alphabets and no special characters except spaces, the task is to find lexicographically adjacent pairs of characters… 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 a string S of length N, find the length of the two longest non-intersecting subsequences in S that are anagrams of each other. Input:… 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 a string, str consists of characters ‘a’, ‘b’ & ‘c’, the task is to check whether string str ends with “abc” or not. If… Read More
Given a string S of length n, for each character S[i], the task is to find the number of palindromic substrings of length K such… 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[] of size n, the task is to find the maximum possible size x of a group such that the difference between… Read More

Start Your Coding Journey Now!