## Source to destination in 2-D path with fixed sized jumps

Given the source point and the destination point of the path and two integers x and y. The task is to check whether it is… Read More »

- Eggs dropping puzzle (Binomial Coefficient and Binary Search Solution)
- Maximum profit after buying and selling the stocks
- Program to find the Hidden Number
- Reach the numbers by making jumps of two given lengths
- Longest subarray having average greater than or equal to x
- Modular exponentiation (Recursive)
- Find the unit place digit of sum of N factorials
- Largest palindromic number in an array
- Make all numbers of an array equal
- Puzzle | Cut Blue Painted Cube
- Check if a number is perfect square without finding square root
- Check if a number can be expressed as a^b | Set 2
- Puzzle | Selling Chocolates
- A Sum Array Puzzle
- Sum of the first N Prime numbers
- Final cell position in the matrix
- Check if it is possible to reach a number by making jumps of two given length
- Probability that two persons will meet
- Program to find minimum number of lectures to attend to maintain 75%
- Sum of minimum elements of all subarrays
- Generate all rotations of a number
- Number of array elements derivable from D after performing certain operations
- Sum of the multiples of two numbers below N
- Number of quadrilaterals possible from the given points
- Check if a number is a Mystery Number
- Count number of triplets with product equal to given number with duplicates allowed
- Minimum number of sets with numbers less than Y
- Sum of all Primes in a given range using Sieve of Eratosthenes
- Minimum operations required to make all the array elements equal
- Find elements of array using XOR of consecutive elements

Given the source point and the destination point of the path and two integers x and y. The task is to check whether it is… Read More »

Given an array consisting of even number of elements, the task is to divide the array into M group of elements (every group must contain… Read More »

Given an array arr[], the task is to find the maximum length of a subsequence such that the adjacent elements in the subsequence have a… Read More »

Given an array of N distinct integers, the task is to find the number of pairs (x, y) such that x < y. Example: Input:… Read More »

Given the values of m and c for the equation of a line y = (m * x) + c, the task is to find… Read More »

Given a number n, the task is to print all the numbers less than or equal to n which are perfect cubes as well as… Read More »

Given a range [L, R], the task is to find all the numbers from the range which are composite as well as the eventual sum… Read More »

Given the value of ‘N’ and ‘I’. Here, represents the number of internal nodes present in an N-ary tree and every node of the N-ary… Read More »

Given a number N, the task is to find the log value of the factorial of N i.e. log(N!). Note: ln means log with base… Read More »

A useful application of Pascal’s triangle is the calculation of combinations. The formula to find nCr is n! / r! * (n – r)! which… Read More »

Given an integer N, the task is to count all possible N digit numbers such that A + reverse(A) = 10N – 1 where A… Read More »

Given a rectangle of height H and width W which has the bottom left corner at (0, 0). The task is to count the number… Read More »

Given an integer N, the task is to construct a tree such that sum of for all ordered pairs (u, v) is maximum where u… Read More »

Given the position of a Bishop on an 8 * 8 chessboard, the task is to count the total number of squares that can be… Read More »

Given the number of ‘X’ and ‘Y’ in a string which consists of characters from the set {‘X’, ‘Y’}, the task is to find the… Read More »