# Tag Archives: Suffix

Given an array arr[] consisting of N strings and Q queries in form of two strings prefix and suffix, the task for each query is… Read More
Given a string S consisting of N characters, the task is to find the length of all prefixes of the given string S that are… Read More
Given three strings S, S1, and S2, the task is to check if the number of substrings that start and end with S1 and S2… Read More
Given an array arr[] consisting of N integers, the task is to find the absolute difference between the minimum and maximum sum of any pairs… Read More
Given an array arr[] consisting of N positive integers and a 2D array queries[][] of the type {a, K, X} such that if the value… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to find the minimum difference between the maximum and minimum… Read More
Given an array arr[] of size N, the task is to find the lexicographically largest permutation array by reversing any suffix subarrays from the array.… Read More
Given an array arr[] consisting of N integers and an array Q[][] consisting of queries of the form [L, R]., the task for each query… Read More
Given an array arr[] consisting of N distinct integers and an array queries[] consisting of Q queries, the task is for each query is… Read More
Given an array arr[] and an array Q[][] consisting of queries of the form of {L, R}, the task for each query is to find… 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 two strings S and T of length N and M respectively, the task is to check if the string S can be converted to… Read More
Given an array arr[] consisting of N integers, the task is to count ways to split array into two subarrays of equal sum by changing… 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 a binary array, in which, moving an element from index i to index j requires abs(i – j) cost. The task is to find… Read More