## Minimum removals to make array sum odd

Given an array Arr[] of N integers. The task is to find minimum number of elements needed to be removed from the array, so that… Read More »

- Find the first maximum length even word from a string
- Minimum elements to be removed such that sum of adjacent elements is always even
- Count array elements that divide the sum of all other elements
- Replace array elements by sum of next two consecutive elements
- Maximum subarray sum in array formed by repeating the given array k times
- Array element with minimum sum of absolute differences
- Length of the longest substring with consecutive characters
- Minimum number of given operations required to convert a string to another string
- Minimum elements to be removed such that sum of adjacent elements is always odd
- Maximum value of arr[i] % arr[j] for a given array
- Minimum number of operations on an array to make all elements 0
- Group consecutive characters of same type in a string
- Count number of pairs (i, j) such that arr[i] * arr[j] > arr[i] + arr[j]
- Maximum length subarray with difference between adjacent elements as either 0 or 1
- Count Subarrays with Consecutive elements differing by 1
- Check if a binary string contains consecutive same or not
- Minimum removals to make array sum odd
- Minimum replacements to make adjacent characters unequal in a ternary string
- Minimize sum of adjacent difference with removal of one element from array
- Generate lexicographically smallest string of 0, 1 and 2 with adjacent swaps allowed
- Longest Sub-array with maximum average value
- Move all zeros to start and ones to end in an Array of random integers
- Character whose frequency is equal to the sum of frequencies of other characters of the given string
- Minimum cost to make two strings same
- Number of ways to remove a sub-string from S such that all remaining characters are same
- Minimum moves to reach from i to j in a cyclic string
- Maximum occurrence of prefix in the Array
- Minimum index i such that all the elements from index i to given index are equal
- Pick maximum sum M elements such that contiguous repetitions do not exceed K
- Cost to make a string Panagram

Given an array Arr[] of N integers. The task is to find minimum number of elements needed to be removed from the array, so that… Read More »

Given an array arr[] of integers and an integer pos, the task is to find the minimum index i such that all the elements from… Read More »

Given two strings S and T of equal length. Both strings contain only the characters ‘0’ and ‘1’. The task is to find the minimum… Read More »

Given an array of N integers. The task is to eliminate the minimum number of elements such that in the resulting array the sum of… Read More »

Given an array arr[] of N integers and an integer cost, the task is to calculate the cost of making all the elements of the… Read More »

Given a binary string str consisting of characters ‘0’ and ‘1’. The task is to find whether the string is valid or not. A string… Read More »

Given an integer k and an integer array arr[] of n elements, the task is to find the largest sub-array sum in the modified array… Read More »

Given a string of ‘0’, ‘1’ and ‘2’. The task is to find the minimum number of replacements such that the adjacent characters are not… Read More »

Given an array arr[] of N integers, the task is to find an element x from the array such that |arr[0] – x| + |arr[1]… Read More »

Given a string str containing only characters 0, 1 and 2, you can swap any two adjacent (consecutive) characters 0 and 1 or any two… Read More »

Given a string str of lowercase alphabets, the task is to find the length of the longest sub-string of characters in alphabetical order i.e. string… Read More »

Given a cyclic string str and two integers i and j, the task is to count the minimum number of steps required to move from… Read More »

Given an array arr[], the task is to find the maximum value of arr[i] % arr[j] for all possible pairs. Examples: Input: arr[] = {… Read More »

Given an array arr[] of non-negative integers, the task is to count pairs of indices (i, j such that arr[i] * arr[j] > arr[i] +… Read More »

Given a string str consisting only of lowercase English alphabets, the task is to count the number of ways to remove exactly one sub-string from… Read More »