## Minimum steps to color the tree with given colors

Given a tree with N nodes which initially have no color and an array color[] of size N which represent the color of each node… Read More »

- Make all numbers of an array equal
- Reach the numbers by making jumps of two given lengths
- Largest palindromic number in an array
- Check if a number is perfect square without finding square root
- Sum of XOR of all subarrays
- Sum of minimum elements of all subarrays
- Sum of the first N Prime numbers
- Minimum operations required to make all the array elements equal
- Find the unit place digit of sum of N factorials
- A Sum Array Puzzle
- Check if it is possible to reach a number by making jumps of two given length
- Puzzle | Neighbors in a round table
- Generate all rotations of a number
- Find the number in a range having maximum product of the digits
- Count of pairs (x, y) in an array such that x < y
- Find K Closest Points to the Origin
- Number of array elements derivable from D after performing certain operations
- Minimum number of sets with numbers less than Y
- Immediate smallest number after re-arranging the digits of a given number
- Check if a number is a Mystery Number
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Find the Nth term of the series 14, 28, 20, 40,.....
- Program to Convert Hexadecimal Number to Binary
- Minimum Increment / decrement to make array elements equal
- Graph Types and Applications
- Sum of the multiples of two numbers below N
- Midpoint ellipse drawing algorithm
- Count pairs in array whose sum is divisible by K
- Find elements of array using XOR of consecutive elements
- Remove characters from a numeric string such that string becomes divisible by 8

Given a tree with N nodes which initially have no color and an array color[] of size N which represent the color of each node… Read More »

Given a binary string str, the task is to find the largest power of 2 that divides the decimal equivalent of the given binary number.… Read More »

Given two integers K and N, the task is to count the number of ways to arrange K different objects taking N objects at a… Read More »

Given a string str, the task is to check if the frequency of any character is more than half the length of the given string.… Read More »

Given a circular ring which has marking from 1 to N. Given two numbers A and B, you can stand at any place(say X) and… Read More »

Given an integer N, the task is to find the value of F(N) if: F(1) = 0 F(2) = 2 F(N) = 0, if N… Read More »

Given an integer N > 0, the task is to find the maximum product of digits among numbers less than or equal to N. Examples:… Read More »

Given two numbers N and M, the task is to find the highest power of M that divides N. Note: M > 1 Examples: Input:… Read More »

Given an array of N elements and you can perform two operations on it: Increase any of the array element by X once. Decrease any… Read More »

Given a number X and an array of N numbers. The task is to print all the numbers in the array whose set of prime… Read More »

Given a 2-D array of order N X M array elements, the task is to check if we can select a number from every row… Read More »

Given a series of numbers 1, 2, 4, 3, 5, 7, 9, 6, 8, 10, 11, 13… The task is to find the sum of… Read More »

There are N stations in a straight line, each of them has some non-negative radiation power. Every station can increase the radiation power of its… Read More »

Given the first two terms of the series as 1 and 6 and all the elements of the series are 2 less than the mean… Read More »

Given two straight lines with co-efficients of there equations a1x + b1y + c1 = 0 and a2x + b2y + c2 = 0 respectively,… Read More »