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

# Tag Archives: Suffix

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 to… 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 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

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

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

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