Given an array arr[] of N integer pairs and an integer K, the task is to find the indices of the K largest pairs in… Read More

# Category Archives: Data Structures

Find an arrangement of M colors for N indices such that no two adjacent indices have same color and each color can be used at… Read More

Given a string str of size N, the task is to find the suffix array of the given string. Note: A suffix array is a… Read More

Given a sentence S of size N where each word is a concatenation of a numeric part followed by a bunch of characters. The task… Read More

Given a string str denoting a sequence of moves. The task is to check if the moves are repeated an infinite number of times then… Read More

A binary string S of length N is constructed from a string P of N characters and an integer X. The choice of the ith… Read More

Given an array A[] of length N, the task is to find the minimum size of the array after selecting and removing distinct element pairs… Read More

Given a string str of length N and an integer K, the task is to split the string into K sized groups and if the… Read More

Given an array arr[] of size N and an integer X, the task is to find the number of ordered pairs (i, j) such that… Read More

Given an array arr[] having N pair of integers of the form (x, y), the task is to maximize the sum y values in selected… Read More

Given an array arr[] of size N, the task is to make all elements equal by applying the operation given below any number of times… Read More

Given an array containing digits[], where each element is a single digit integer. The array may contain duplicates. The task is to find all the… Read More

Given a string S of size N, representing a large integer. The task is to find the largest valued even integer which is a non-empty… Read More

Given a binary circular array arr[] of size N, the task is to find the minimum swaps to group all 0s together in the array.… Read More