Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
Misc
7.8K+ articles
Mathematical
5.1K+ articles
Prime Number
615+ articles
number-digits
612+ articles
Combinatorial
460+ articles
number-theory
424+ articles
Modular Arithmetic
207+ articles
prime-factor
191+ articles
factorial
141+ posts
Recent Articles
Popular Articles
Factorial Coding Problems
Last Updated: 23 July 2025
Factorialof 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 – ...
read more
Mathematical
DSA
factorial
Interesting Facts about Factorial
Last Updated: 23 July 2025
Factorial of n or n! mainly represents different ways to arrange n items. For example, 3 items ABC can be arranged 3! = 3 x 2 x 1 = 6 ways. The ways are ABC, ACB, BAC, BC...
read more
Mathematics
School Learning
factorial
C++ Program to Find Factorial of a Number Using Dynamic Programming
Last Updated: 23 July 2025
The Factorial of a number N can be defined as the product of numbers from 1 to the number N. More formally factorial of n can be defined by function,f(n) = 1 \times 2 \tim...
read more
C++ Programs
C++
Picked
factorial
CPP Examples
C++ Program to Find Factorial Using Recursion
Last Updated: 23 July 2025
The factorial of a number is denoted by "n!" and it is the product of all positive integers less than or equal to n. In this article, we will learn how to find the factori...
read more
C++ Programs
C++
Picked
Basic Coding Problems
factorial
recursive-approach
CPP Examples
C++ Program to Find Factorial of a Number Using Iteration
Last Updated: 23 July 2025
Factorial of a number n is the product of all integers from 1 to n. In this article, we will learn how to find the factorial of a number using iteration in C++.ExampleInpu...
read more
C++ Programs
C++
Picked
Basic Coding Problems
factorial
CPP Examples
GFact | Why Factorial of 0 is 1?
Last Updated: 04 October 2023
Have you ever thought about why the factorial of 0 is 1? If yes then here you can find the justification for the same.why factorial of 0(0!) is 1?Factorial of Number:Facto...
read more
DSA
GFacts
factorial
math
Find sum of factorials till N factorial (1! + 2! + 3! + ... + N!)
Last Updated: 29 February 2024
Given a positive integer N. The task is to compute the sum of factorial from 1! to N!, 1! + 2! + 3! + ... + N!.Examples:Input: N = 5Output: 153Explanation: 1! + 2! + 3! + ...
read more
Pattern Searching
Mathematical
Algo Geek
Algo-Geek 2021
DSA
factorial
series
series-sum
Find subfactorial of a number
Last Updated: 23 July 2025
Given an integer N, the task is to find the subfactorial of the number represented as !N. The subfactorial of a number is defined using below recurrence relation of a numb...
read more
Mathematical
DSA
factorial
Sequence and Series
Count of N-bit odd and even integers with K set bits
Last Updated: 23 July 2025
Given two positive integers N and K, the task is to count the number of even and odd integers consisting of N bits, out of which K bits are set.Examples:Input: N = 5, K = ...
read more
Bit Magic
Mathematical
Combinatorial
DSA
factorial
Permutation and Combination
Find remainder when a number A raised to N factorial is divided by P
Last Updated: 23 July 2025
Given three integers A, N and P, the task is to find (A^(N!)) % P.Examples:Input: A = 2, N = 1, P = 2Output: 0Explanation: As (2^(1!)) = 2Therefore 2 % 2 will be 0.Input: ...
read more
Divide and Conquer
Mathematical
DSA
factorial
Modular Arithmetic
maths-power
Recursive Program to find Factorial of a large number
Last Updated: 23 July 2025
Given a large number N, the task is to find the factorial of N using recursion.Factorial of a non-negative integer is the multiplication of all integers smaller than or eq...
read more
DSA
factorial
large-numbers
Find the suffix factorials of a suffix sum array of the given array
Last Updated: 23 July 2025
Given an array arr[] consisting of N positive integers, the task is to find the suffix factorials of a suffix sum array of the given array.Examples:Input: arr[] = {1, 2, 3...
read more
DSA
factorial
suffix-sum
Suffix
Exponential factorial of N
Last Updated: 23 July 2025
Given a positive integer N, the task is to print the Exponential factorial of N. Since the output can be very large, print the answer modulus 1000000007.Examples: Input: N...
read more
Mathematical
DSA
factorial
Factorial of a number without using multiplication
Last Updated: 23 July 2025
Given a positive number N, the task is to calculate the factorial of N without using the multiplication operator.Examples:Input: N = 5Output:120Explanation:5*4*3*2*1=120In...
read more
DSA
factorial
Program to find the value of P(N + r) for a polynomial of a degree N such that P(i) = 1 for 1 ≤ i ≤ N and P(N + 1) = a
Last Updated: 23 July 2025
Given three positive integers N, R, and A and a polynomial P(X) of degree N, P(i) = 1 for 1 ? i ? N and the value of P(N + 1) is A, the task is to find the value of the P(...
read more
DSA
factorial
maths-polynomial
1
2
3
4
...
10
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !