## Maximize the maximum among minimum of K consecutive sub-arrays

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 »

## Find index i such that prefix of S1 and suffix of S2 till i form a palindrome when concatenated

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 »

## Count the number of common divisors of the given strings

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 »

## A Sum Array Puzzle

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 »

## Find an integer X which is divisor of all except exactly one element in an array

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 »

## Python program to print the substrings that are prefix of the given string

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 »

## Sub-strings of a string that are prefix of the same string

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 »

## Maximize the sum of array by multiplying prefix of array with -1

Given an array of elements ‘arr’, the task is to maximise the sum of the elements of this array after performing the following operation: You… Read More »

## Find the longest common prefix between two strings after performing swaps on second string

Given two strings and . Find the longest common prefix between them after performing zero or more operation on string . In each operation, you… Read More »

## Check if a String starts with any of the given prefixes in Java

Given a String and an array of prefixes. The task is to check whether the given String starts with any of the given prefixes or… Read More »

## Longest Common Prefix Matching | Set-6

Given a set of strings, find the longest common prefix. Examples: Input: str[] = {geeksforgeeks, geeks, geek, geezer} Output: gee Input: str[] = {apple, ape,… Read More »

## Find an element which divides the array in two subarrays with equal product

Given, an array of size N. Find an element which divides the array into two sub-arrays with equal product. Print -1 if no such partition… Read More »

## Number of subarrays with m odd numbers

Given an array of n elements and an integer m, we need to write a program to find the number of contiguous subarrays in the… Read More »

## Given an array and three numbers, maximize (x * a[i]) + (y * a[j]) + (z * a[k])

Given an array of n integers, and three integers x, y and z. maximise the value of (x * a[i]) + (y * a[j]) +… Read More »