## Longest prefix in a string with highest frequency

Given a string, find a prefix with the highest frequency. If two prefixes have the same frequency then consider the one with maximum length. Examples:… 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
- Count of strings whose prefix match with the given string to a given length k
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Minimum cuts required to convert a palindromic string to a different palindromic string
- Longest string in an array which matches with prefix of the given string
- Find index i such that prefix of S1 and suffix of S2 till i form a palindrome when concatenated
- 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
- Count all prefixes of the given binary array which are divisible by x
- Count the number of common divisors of the given strings
- Maximum length palindrome that can be created with characters in range L and R
- 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
- Find an index such that difference between product of elements before and after it is minimum
- Longest prefix in a string with highest frequency
- Find the final radiations of each Radiated Stations
- Find the maximum length of the prefix

Given a string, find a prefix with the highest frequency. If two prefixes have the same frequency then consider the one with maximum length. Examples:… Read More »

Given an array of strings arr[] and Q queries where each each query consists of a string str, the task is to find the longest… Read More »

Given an array arr[] of N integers where all elements of the array are from the range [0, 9] i.e. a single digit, the task… Read More »

Given an integer arr[], the task is to find an index such that the difference between the product of elements up to that index and… Read More »

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 »