## Count of strings whose prefix match with the given string to a given length k

Given an array of strings arr[] and given some queries where each query consists of a string str and an integer k. The task is… Read More »

- A Sum Array Puzzle
- Sub-strings of a string that are prefix of the same string
- Print the longest prefix of the given string which is also the suffix of the same string
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Find index i such that prefix of S1 and suffix of S2 till i form a palindrome when concatenated
- Minimum cuts required to convert a palindromic string to a different palindromic string
- Find an integer X which is divisor of all except exactly one element in an array
- Maximize the maximum among minimum of K consecutive sub-arrays
- Maximize the sum of array by multiplying prefix of array with -1
- Find the longest common prefix between two strings after performing swaps on second string
- Count the number of common divisors of the given strings
- Count all prefixes of the given binary array which are divisible by x
- Python program to print the substrings that are prefix of the given string
- Queries to answer the number of ones and zero to the left of given index
- Maximum length palindrome that can be created with characters in range L and R
- Find the final radiations of each Radiated Stations
- Count of strings whose prefix match with the given string to a given length k

Given an array of strings arr[] and given some queries where each query consists of a string str and an integer k. The task is… Read More »

Given a string str and Q queries. Each query consists of two numbers L and R. The task is to find the maximum length palindrome… Read More »

There are N stations in a straight line, each of them has some non-negative radiation power. Every station can increase the radiation power of its… Read More »

Given a binary array and Q queries. Every query consists of a number K, the task is to print the number of ones and zeros… Read More »

Given a binary array arr[] and an integer x, the task is to count all the prefixes of the given array which are divisible by… Read More »

Given an unsorted array arr[] of n integers and an integer k, the task is to find the kth largest element in the given index… Read More »

Given a string str, the task is to find the longest prefix which is also the suffix of the given string. The prefix and suffix… Read More »

Given palindromic string s, the task is to find minimum k, such that you can cut this string into k+1 parts, and then unite them… Read More »

Given an integer K and an array arr[], the task is to split the array arr[] into K consecutive subarrays to find the maximum possible… Read More »

Given two strings A and B of equal lengths, the task is to find an index i such that A[0…i] and B[i+1…n-1] give a palindrome… Read More »

Given two strings a and b, the task is to count the number of common divisors of both the strings. A string s is a… Read More »

Given an array arr[] of n integers, construct a Sum Array sum[] (of same size) such that sum[i] is equal to the sum of all… Read More »

Given an array of integers. Find an integer X which is the divisor of all except for exactly one element in the given array. Note:… Read More »

Given a string, print all the possible substrings which are also the prefix of the given string. Examples: Input : ababc Output : a, ab,… Read More »

Given a string str, the task is to count all possible sub-strings of the given string that are prefix of the same string. Examples: Input:… Read More »