## 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 »

## Print k different sorted permutations of a given array

Given an array arr[] containing N integers, the task is to print k different permutations of indices such that the values at those indices form… Read More »

## Number of trailing zeroes in base 16 representation of N!

Given an integer N, the task is to find the number of trailing zeroes in the base 16 representation of the factorial of N. Examples:… Read More »

## Minimum number of stacks possible using boxes of given capacities

Given N boxes with their capacities which denotes the total number of boxes that it can hold above it. You can stack up the boxes… Read More »

## 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 »

## Check if the given string is the same as its reflection in a mirror

Given a string S containing only uppercase English characters. The task is to find whether S is the same as its reflection in a mirror.… Read More »

## Check if an array of 1s and 2s can be divided into 2 parts with equal sum

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 »

## Make a tree with n vertices , d diameter and at most vertex degree k

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 »

## Sum of all Submatrices of a Given Matrix

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 »

## Maximum Bitwise AND pair from given range

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

## Split the array into odd number of segments of odd lengths

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 »

## Minimum removals to make array sum odd

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 »

## Check whether the number can be made perfect square after adding 1

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 »

## Number of Hamiltonian cycle

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 »

## Maximize the maximum among minimum of K consecutive sub-arrays

Given an integer K and an array arr[], the task is to split the array arr[] into K consecutive subarrays to find the maximum possible… Read More »