## Remove an element to minimize the LCM of the given array

Given an array arr[] of length N ≥ 2. The task is to remove an element from the given array such that the LCM of… Read More »

## Find the maximum element in the array other than Ai

Given an array arr[] of size N. The task is to find maximum element among N – 1 elements other than arr[i] for each i… Read More »

## Replace elements with absolute difference of smallest element on left and largest element on right

Given an array arr[] of N integers. The task is to replace all the elements of the array by the absolute difference of the smallest… Read More »

## Find the longest sub-string which is prefix, suffix and also present inside the string | Set 2

Given string str. The task is to find the longest sub-string which is a prefix, a suffix and a sub-string of the given string, str.… Read More »

## Find the farthest smaller number in the right side

Given an array arr[] of size N. For every element in the array, the task is to find the index of the farthest element in… Read More »

## Find number of triplets in array such that a[i]>a[j]>a[k] and i<j<k

Given an array arr of size N. The task is to count number of triplets in the array such that a[i]>a[j]>a[k] and i<j<k Examples: Input… Read More »

There are N stations in a straight line, each of them has some non-negative radiation power. Every station can increase the radiation power of its… Read More »

## Find maximum sum taking every Kth element in the array

Given an array arr[] of integers and an integer K, the task is to find the maximum sum taking every Kth element i.e. sum =… Read More »

## Maximize the maximum among minimum of K consecutive sub-arrays

Given an integer K and an array arr[], the task is to split the array arr[] into K consecutive subarrays to find the maximum possible… Read More »

## Queries for number of distinct integers in Suffix

Given an array of N elements and Q queries, where each query contains an integer K. For each query, the task is to find the… Read More »

## Number of balanced bracket subsequence of length 2 and 4

Given a bracket sequence of even length. The task is to find how many ways are there to make balanced bracket subsequences from the given… Read More »

## Find an element which divides the array in two subarrays with equal product

Given, an array of size N. Find an element which divides the array into two sub-arrays with equal product. Print -1 if no such partition… Read More »

## Counting k-mers via Suffix Array

Pre-requisite: Suffix Array. What are k-mers? The term k-mer typically refers to all the possible substrings of length k that are contained in a string.… Read More »

## Burrows – Wheeler Data Transform Algorithm

What is the Burrows-Wheeler Transform? The BWT is a data transformation algorithm that restructures data in such a way that the transformed message is more… Read More »

## Print Kth character in sorted concatenated substrings of a string

Given a string of lower alphabetic characters, find K-th character in a string formed by substrings (of given string) when concatenated in sorted form. Examples:… Read More »