## Move all zeros to start and ones to end in an Array of random integers

Given an array arr[] of random integers, the task is to push all the zero’s in the array to the start and all the one’s… 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
- Maximum subarray sum in array formed by repeating the given array k times
- Replace array elements by sum of next two consecutive elements
- Array element with minimum sum of absolute differences
- Length of the longest substring with consecutive characters
- Minimum elements to be removed such that sum of adjacent elements is always odd
- Minimum number of given operations required to convert a string to another string
- 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]
- Count Subarrays with Consecutive elements differing by 1
- Minimum removals to make array sum odd
- Maximum length subarray with difference between adjacent elements as either 0 or 1
- Check if a binary string contains consecutive same or not
- 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
- Number of ways to remove a sub-string from S such that all remaining characters are same
- Minimum cost to make two strings 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 random integers, the task is to push all the zero’s in the array to the start and all the one’s… Read More »

Given an array arr[] of size n, The task is to replace every element of the array by the sum of next two consecutive elements… Read More »

Given an array of N elements. The task is to find the maximum number of the contiguous automorphic numbers in the given array. Automorphic Numbers:… Read More »

Given a string str consisting of lowercase English alphabets. The task is to find whether there is any character in the string whose frequency is… Read More »

Given a string of words separated by spaces. The task is to find the first maximum length even word from the string. Eg: “You are… Read More »

Given an array arr[] of N positive integers and an integer K. It is given that you start at position 0 and you can move… Read More »

Given an array of positive integers of size greater than 2. The task is to find the minimum value of sum of consecutive difference modulus… Read More »

Given a string str consisting of upper case alphabets, numeric digits and arithmetic operators, the task is to group them into continuous sub-strings of same… Read More »

Given an array arr[] of distinct elements and two integers M and K, the task is to generate an array from the given array elements… Read More »

Given four integers a, b, c, d and two strings S1 and S2 of equal length, which consist only of the characters ‘2’, ‘1’ and… Read More »

Given a string consisting of lower case English Alphabets. The task is to count the number of occurrences of the non-empty prefix which occurs the… Read More »

Given an array arr[] of n integers. The task is to find the maximum length of the sub-array which has the maximum average value (average… Read More »

Given an array of n integers. The task is to find the maximum length of the sub-array such that absolute difference between all the consecutive… 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[], the task is to count the number of elements from the array which divide the sum of all other elements. Examples:… Read More »