Skip to content

# Tag Archives: Suffix-Array

Given an array arr[] consisting of N integers and an integer K, the task is to find the sum of the length of the two… 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, 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
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
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
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
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
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<kExamples:   Input :… Read More