Skip to content

Tag Archives: Suffix-Array

Given an array arr[] of non-negative integers of size N and an integer P. Neighboring values of every non-zero element are incremented by 2 in… Read More
Given an array arr[] of size N, find a new array ans[] where each index i represents the absolute difference between the sum of elements… Read More
You are given an array A[] of size N, the task is to divide the array into exactly three subarrays such that every element belongs… 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 an array arr[] of N integers, the task is to print the last element left of every suffix array obtained by performing the following… Read More
Given an array arr[] of size N, the task is to find the number of prefix arrays whose maximum is less than the maximum element… Read More
Given an array arr[] of length N, the task is to find the smallest pair of indices (i, j) such that the product of elements… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum index K such that the product of subarrays {arr[0], arr[K]}… Read More
Given an array arr[] consisting of N integers, the task is to find the mean of the array formed by the products of unordered pairs… Read More
Given an array of integers A[] of size N, the task is to find the minimum sum that can be obtained by any pair of… Read More
Given a string S, the task is to find the number of ways to split the given string S into two non-empty palindromic strings.Examples: Input:… Read More
Given an integer array arr[] of size N, the task is to find the GCD of LCM of all unique pair (i, j) of the… Read More
Given a big string and an array of small strings, all of which are smaller in length than the big string. The task is to… Read More
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