## Split an array into groups of 3 such that X3 is divisible by X2 and X2 is divisible by X1

Given an array A containing N elements (N is divisible by 3), the task is to split the numbers into groups of 3, let the… Read More »

- Length of the longest alternating subarray
- Number of array elements derivable from D after performing certain operations
- Choose atleast two elements from array such that their GCD is 1 and cost is minimum
- Maximize the value of A by replacing some of its digits with digits of B
- Minimum number of moves to make all elements equal
- Check if array can be divided into two sub-arrays such that their absolute difference is K
- Print array elements in alternatively increasing and decreasing order
- Maximum possible time that can be formed from four digits
- Find Sum of pair from two arrays with maximum sum
- Find minimum operations needed to make an Array beautiful
- Minimize the number of replacements to get a string with same number of 'a', 'b' and 'c' in it
- Distribute candies in a Binary Tree
- Generate permutation of 1 to N such that absolute difference of consecutive numbers give K distinct integers
- Minimum number of operations required to reduce N to 1
- Longest Subsequence with at least one common digit in every element
- Minimum number of elements to be removed so that pairwise consecutive elements are same
- Length of longest consecutive ones by at most one swap in a Binary String
- Minimum number N such that total set bits of all numbers from 1 to N is at-least X
- Find index i such that prefix of S1 and suffix of S2 till i form a palindrome when concatenated
- Number of strictly increasing Buildings from right with distinct Colors
- Find largest number smaller than N with same set of digits
- Maximum count of sub-strings of length K consisting of same characters
- Find minimum speed to finish all Jobs
- Check if a string can be converted to another string by replacing vowels and consonants
- Count of Numbers such that difference between the number and sum of its digits not less than L
- Minimum number of digits to be removed so that no two consecutive digits are same
- Split an array into groups of 3 such that X3 is divisible by X2 and X2 is divisible by X1
- Update adjacent nodes if the current node is zero in a Singly Linked List
- Construct a binary string following the given constraints
- Minimum Cuts can be made in the Chessboard such that it is not divided into 2 parts

Given an array A containing N elements (N is divisible by 3), the task is to split the numbers into groups of 3, let the… Read More »

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 »

Given two strings S1 and S2, you are allowed only to change a character at any position to any vowel if it is a vowel… Read More »

Given an array of N including positive and negative numbers only. The task is to find the length of the longest alternating (means negative-positive-negative or… Read More »

Given two integers A and B, the task is to generate and print a string str such that: str must only contain the characters ‘a’… Read More »

Given a binary tree with N nodes, in which each node value represents number of candies present at that node, and there are N candies… Read More »

Given two string A and B which represents two integers, the task is to print the maximized value of A after replacing 0 or more… Read More »

Given a string str and an integer k. The task is to count the occurrences of sub-strings of length k that consist of the same… Read More »

Given an integer N. You can select any two digits from this number (the digits can be same but their positions should be different) and… Read More »

Given an array arr[] and an integer K, the task is to find whether the array can be divided into two sub-arrays such that the… Read More »

Given two integer arrays arr[] and cost[] where cost[i] is the cost of choosing arr[i]. The task is to choose a subset with at least… Read More »

Given a String of three Colours(G, B, Y) as input, the task is to print the resultant combined colour formed according to the rule given… Read More »

Given a Natural number N and a whole number L, the task is to find the count of numbers, smaller than or equal to N,… Read More »

Given a string consisting of only three possible characters ‘a’, ‘b’ or ‘c’. The task is to replace characters of the given string with ‘a’,… Read More »

Given a number X, the task is to find the minimum number N such that total set bits of all numbers from 1 to n… Read More »