## 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
- Replace array elements by sum of next two consecutive elements
- Maximum length subarray with difference between adjacent elements as either 0 or 1
- Minimize sum of adjacent difference with removal of one element from array
- Group consecutive characters of same type in a string
- Move all zeros to start and ones to end in an Array of random integers
- Longest Sub-array with maximum average value
- Minimum cost to make two strings same
- Character whose frequency is equal to the sum of frequencies of other characters of the given string
- Maximum occurrence of prefix in the Array
- 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 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 »