## Count of all values of N in [L, R] such that count of primes upto N is also prime

Given two positive integers L and R, the task is to find out the total number of values between range [L, R] such that the… Read More »

- Count ways to partition a string such that both parts have equal distinct characters
- Range sum queries for anticlockwise rotations of Array by K indices
- Sum of bit differences for numbers from 0 to N
- Longest string which is prefix string of at least two strings
- Longest subsequence possible that starts and ends with 1 and filled with 0 in the middle
- Print the longest palindromic prefix of a given string
- Check if an array can be formed by merging 2 non-empty permutations
- Longest equal substring with cost less than K
- Maximum length prefix such that frequency of each character is atmost number of characters with minimum frequency

Given two positive integers L and R, the task is to find out the total number of values between range [L, R] such that the… Read More »

Given a string S, the task is to find the number of ways to split the given string S into two non-empty palindromic strings. Examples:… Read More »

Given an array arr[] consisting of N non-negative integers, the task is to find an integer K for every index such that at least K… Read More »

Given an array arr[] of N integers the task is to generate a prefix product array from the given array. In a prefix product array,… Read More »

Given a string str of lowercase alphabets, the task is to remove minimum characters from the given string so that string can be break into… Read More »

Given an array arr[] of size N containing integers. The task is to find the length of the longest sub-array having sum equal to the… Read More »

Given a number N, the task is to calculate the total number of corresponding different bit in the binary representation for every consecutive number from… Read More »

Given a binary string s, the task is to find the length of longest subsequence that can be divided into three substrings such that the… Read More »

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 »

Given a string str, the task is to find the longest palindromic prefix of the given string. Examples: Input: str = “abaac” Output: aba Explanation:… Read More »

Given an array arr consisting of N elements and Q queries of the following two types: 1 K: For this type of query, the array… Read More »

Given a set of strings of the same length, we need to find the length of the longest string which is a prefix string of… Read More »

Given a string S, the task is to count the number of ways to partition the string into two non-empty parts such that both the… Read More »

Given a string S, the task is to find the prefix of string S with the maximum possible length such that frequency of each character… Read More »

Given two string X and Y of the same length which consists of lowercase letters and also an integer K. The task is to find… Read More »