Skip to content

Tag Archives: Suffix

Given a string S of length N, the task is to find the length of the longest substring X of the string S such that:… Read More
Suffix Sum ArrayGiven an array arr[] of size N, the task is to compute and return its suffix sum array.  Suffix Sum is a precomputation… Read More
Given an array arr[] consisting of N positive integers, the task is to find the suffix factorials of a suffix sum array of the given… Read More
 Given K (K > 2) arrays of different sizes in a 2D list arr[][] where elements in each array are non-negative. Find the minimum common… Read More
Given an array arr[]. The task is to minimize the number of operations required to make all the elements in arr[] equal. It is allowed… Read More
Given a string str and an array of words word[], the task is to find whether str is a prefix string of word[]. Examples: Input:… Read More
Given an array arr[] of size N and an integer K, the task is to find all the indices in the given array having at… Read More
Given an array arr[] of integers, the task is to find the number of indices for which the prefix product and the suffix product are… Read More
Given two strings str1 and str2, the task is to find the minimum number of prefixes and suffixes of str2 required to form the string… Read More
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

Start Your Coding Journey Now!