## Longest sub-sequence of array containing Lucas numbers

Given an array arr[] of N elements, the task is to find the length of the longest sub-sequence in arr[] such that all the elements… 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
- Modular exponentiation (Recursive)
- Make all numbers of an array equal
- Find the unit place digit of sum of N factorials
- Largest palindromic number in an array
- 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
- Sum of minimum elements of all subarrays
- Probability that two persons will meet
- Generate all rotations of a number
- Program to find minimum number of lectures to attend to maintain 75%
- 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
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Check if a number is a Mystery Number
- Minimum number of sets with numbers less than Y
- Minimum operations required to make all the array elements equal
- Count number of triplets with product equal to given number with duplicates allowed
- Sum of all Primes in a given range using Sieve of Eratosthenes
- Find elements of array using XOR of consecutive elements

Given an array arr[] of N elements, the task is to find the length of the longest sub-sequence in arr[] such that all the elements… Read More »

Given an array containing N elements, each element is either 1 or 2. The task is to find out whether the array can be divided… Read More »

Given three integers N, D and K. The task is to check whether it is possible to make a tree with exactly N vertices, D… Read More »

Given a NxN 2-D matrix, the task to find the sum of all the submatrices. Examples: Input : arr[] = {{1, 1}, {1, 1}}; Output… Read More »

Given a range [L, R], the task is to find a pair (X, Y) such that L ≤ X < Y ≤ R and X… Read More »

Given an array of n length. The task is to check if the given array can be split into an odd number of sub-segment starting… Read More »

Given an array Arr[] of N integers. The task is to find minimum number of elements needed to be removed from the array, so that… Read More »

Given an integer N, the task is to check whether N the given number can be made a perfect square after adding 1 to it.… Read More »

Given an undirected complete graph of N vertices where N > 2. The task is to find the number of different Hamiltonian cycle of the… Read More »

Given a directed graph and a node X. The task is to find the minimum number of edges that must be added to the graph… Read More »

Given an array arr[] of N integers and an integer M where N % M = 0. The task is to find the minimum number… Read More »

Given an array arr[], the task is to find the minimum number of elements that must be removed to make the array good. A sequence… Read More »

Given a range [L, R] and two positive integers N and M. The task is to count the numbers in the range containing only non-zero… Read More »

Given three positive integers N, L and R. The task is to find the number of ways to form an array of size N where… Read More »

Given a range [L, R] where L ≤ R, the task is to generate a random permutation of the sequence [L, L + 1, L… Read More »