# Tag Archives: Permutation and Combination

Given a grid of size M x N and two integers X and Y. A restricted area is defined as the lower left sub-rectangle consisting… Read More
Given an array arr[] of N integers, the task is to find count of triplets having a product less than 0. Examples: Input: arr[] =… Read More
Given a number N and a digit K, The task is to count N digit numbers with at least one digit as K. Examples: Input:… Read More
Given three numbers n, r and p, the task is to compute the value of nCr % p. Note: p is a square-free number and… Read More
Given four numbers L, R, K, and X, the task is to find K distinct decimal numbers in the range [L, R] such that their… Read More
Given integer N and K, denoting the number of teams participating in a football tournament where each team plays only one match with each other… Read More
Given two integers N and X, the task is to convert 1 to N using minimum operations of any of the following operations: Change a… Read More
Given an integer target which represents the total distance to be covered by a car on a straight road. Given another array, station[] of size… Read More
Given a tree of N vertices, the task is to find the number of pairs of vertices such that the distance between them is even… Read More
Given two integers M and N, the task is to generate an MxN matrix having elements in range [1, MxN] such that the average of… Read More
Permutation and Combination are the ways to write a group of objects by selecting them in a specific order and forming their subsets. To arrange… Read More
Given two numbers N and r, find the value of NCr using recursion Examples: Input: N = 5, r = 2Output: 10Explanation: The value of… Read More
As the name implies, a number system is a mathematical system that is used to represent numerals using various symbols and variables. Under the number… Read More
Given an integer N, the task is to print the ways to get the sum N by repeatedly throwing a dice. Input: N = 3Output: 1… Read More
Given an integer N and a chess knight placed in mobile keypad. The task is to count the total distinct N digit numbers which can… Read More