## 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
- Replace array elements by sum of next two consecutive elements
- Move all zeros to start and ones to end in an Array of random integers
- Minimize sum of adjacent difference with removal of one element from array
- Group consecutive characters of same type in a string
- Minimum cost to make two strings same
- Character whose frequency is equal to the sum of frequencies of other characters of the given string
- Pick maximum sum M elements such that contiguous repetitions do not exceed K
- Maximum number of continuous Automorphic numbers
- Print direction of moves such that you stay within the [-k, +k] boundary

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 »