Factorial of a number n is defined as the product of all the positive numbers less than n. In other words, Factorial of a number n can be calculated as: n × (n – 1) × (n – 2) × … × 1. Factorial of a number n is denoted as n!. It is widely used in Combinatorics and Algebra to find the number of ways to arrange or select items.
Examples:
0! = 1
1! = 1
3! = 3 x 2 x 1 = 6
Here is a list of problems based on Factorial.
- Factorial of a Number
- Check Factorial
- Factorial of Large number
- Count trailing zeroes
- Sum of Digits
- Double Factorial
- Last Non-Zero digit
- Check Strong Number
- Factorial without Multiplication
- Length of factorial
- Sum of Factorials till N (1! + 2! + 3! + … + N!)
- Smallest number at least n trailing zeroes
- Factorial of an Array
- K-th Prime Factor
- nCr
- Ways to go from one point to another
- Check Krishnamurthy Number
- nCr using Fermat Little Theorem
- Ways to arrange K different objects
Recommended Links