Skip to content

# Tag Archives: combionatrics

Given three integers A, B and C, the task is to find the value of the expression    Since the answer can be very large,… Read More
Given an array arr[] of size N, the task is to count the number of pairs from the given array whose product contains only a… Read More
Given an integer N representing a non-linear equation of the form 2X + 5Y = N, the task is to find an integral pair (X,… Read More
Given an integer X and integer N, the task is to find the number of unique paths starting from the root in N-ary tree such… Read More
Given an integer N denoting the number of dices, the task is to find the probability of the product of numbers appearing on the top… Read More
Given an integer N, the task is to find the number of permutations of integers from the range [1, N] that can form an acyclic… Read More
Given an array arr[] consisting of N integers, the task is to count the total number of pairs of array elements from the given array… Read More
Given three integers N, P, and K, the task is to find the total number of ways to divide N into K integers having sum… Read More
Given two strings, str1 of length N and str2 of length M of distinct characters, the task is to count the number of ways to… Read More
Given two integers N, M denoting N×M chessboard, the task is to count the number of ways a knight can reach (N, M) starting from… Read More
Given an array arr[] of n integers and an integer K, the task is to find the number of ways to select exactly K even… Read More
Given a number N which denotes the number of stairs, the task is to reach the Nth stair by taking 1, 2 steps any number… Read More
Given an integer N, the task is to generate a random labelled tree of N node with (N – 1) edges without forming cycle.Note: The… Read More
There are 1000 light bulbs and 1000 people. All light bulbs are initially off. Person 1 goes flipping light bulb 1, 2, 3, 4, …… Read More
Given an array of n non-negative integers. The task is to find the sum of the product of elements of all the possible subsets. It… Read More