# Tag Archives: Suffix

## Minimum size substring to be removed to make a given string palindromic

Given a string S, the task is to print the string after removing the minimum size substring such that S is a palindrome or not.… Read More »

## Count numbers from a given range that contains a given number as the suffix

Given three integers A, L, and R, the task is to count numbers from a range L to R which contains A as its suffix.… Read More »

## Split array into two subarrays such that difference of their sum is minimum

Given an integer array arr[], the task is to split the given array into two subarrays such that the difference between their sum is minimum.… Read More »

## Count of all possible numbers not exceeding M having suffix N

Given two positive integers N and M, the task is to find the count of all possible numbers in the range [1, M], having suffix… Read More »

## Smallest String consisting of a String S exactly K times as a Substring

Given a string S of length N and integer K, find the smallest length string which contains the string S as a sub string exactly… Read More »

## Length of longest subarray whose sum is not divisible by integer K

Given an array arr[] of size N and an integer k, our task is to find the length of longest subarray whose sum of elements… Read More »

## Longest subarray of non-empty cells after removal of at most a single empty cell

Given a binary array arr[], the task is to find the longest subarray of non-empty cells after the removal of at most 1 empty cell. … Read More »

## Count of occurrences of each prefix in a string using modified KMP algorithm

Given a string S of size N, the task is to count the occurrences of all the prefixes of the given string S. Examples: Input:… Read More »

## Check whether the binary equivalent of a number ends with given string or not

Given a positive integer N, the task is to check whether the binary equivalent of that integer ends with a given string str or not. Print… Read More »

## Find number of pairs (x, y) in an Array such that x^y > y^x | Set 2

Given two arrays X[] and Y[] of positive integers, find the number of pairs such that x^y > y^x where x is an element from… Read More »

## Find strings that end with a given suffix

Given a set of strings S and a string P, the task is to print all strings from the set with suffix P. Examples: Input:… Read More »

## Sum of decomposition values of all suffixes of an Array

Given an array arr[], the task is to find the sum of decomposition value of the suffixes subarray. Decomposition Value: Decomposition value of a subarray… Read More »

## Check whether the binary equivalent of a number ends with “001” or not

Given a positive integer N, the task is to check whether the binary equivalent of that integer ends with “001” or not. Print “Yes” if… Read More »

## Check if an array can be formed by merging 2 non-empty permutations

Given an array arr[] of length N, the task is to check if it can be formed by merging two permutations of same or different… Read More »

## Longest suffix such that occurrence of each character is less than N after deleting atmost K characters

Given a string S and two integer N and K, the task is to find the maximum length suffix such that occurrence of each character… Read More »