## Count number of triplets with product equal to given number with duplicates allowed

Given an array of positive integers (may contain duplicates), the task is to find the number of triplets whose product is equal to a given… Read More »

Given an array of positive integers (may contain duplicates), the task is to find the number of triplets whose product is equal to a given… Read More »

Given m and n representing number of mangoes and number of people respectively. Task is to calculate number of ways to distribute m mangoes among… Read More »

There are N number of persons in a party, find the total number of handshake such that a person can handshake only once. Examples: Input… Read More »

Given an array of N integers. The task is to find the number of pairs (i, j) such that A[i] & A[j] is odd. Examples:… Read More »

Given N number of stairs. Also given the number of steps that one can cover at most in one leap (K). The task is to… Read More »

Given an array of N numbers and an integer K. The task is to print the number of unique subsequences possible of length K. Examples:… Read More »

Given an array of positive integers(may contain duplicates) and a number ‘m’, find the number of unordered triplets ((Ai, Aj, Ak) and (Aj, Ai, Ak)… Read More »

We have a stick of length L where L is power of 2. The stick got broken at (n-1) randomly chosen points (lengths of parts… Read More »

Let S be a finite partially ordered set. The size of a maximal antichain equals the size of a minimal chain cover of S. This… Read More »

Given an array of N integers and an integer M. You can change the sign(positive or negative) of any element in the array. The task… Read More »

Given three integers N, M and X, the task is to find the number of ways to form an array, such that all consecutive numbers… Read More »

Given a sequence of N elements, only three operations can be performed on any element at most one time. The operations are: Add one to… Read More »

Given N numbers, find the number of permutations in which the sum of elements at odd index and sum of elements at even index are… Read More »

Given N and K. The task is to find out how many different ways are there to represent N as the sum of K non-zero… Read More »

Given a binary string and k, to check whether it’s contains all permutations of length k or not. Examples: Input : Binary string 11001 k… Read More »