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
Python
19.6K+ articles
Misc
7.8K+ articles
Mathematical
5.1K+ articles
Bit Magic
821+ articles
Modular Arithmetic
207+ articles
Bitwise-AND
149+ articles
factorial
141+ articles
maths-log
27+ articles
integer-overflow
6 posts
Recent Articles
Popular Articles
How Do I Detect Unsigned Integer Overflow in C++?
Last Updated: 23 July 2025
In C++, unsigned integer is a datatype that can store only zero and non-negative integer values. According to C++ standard, unsigned integer overflow is defined behavior (...
read more
C++ Programs
C++
Picked
cpp-data-types
integer-overflow
CPP Examples
Check whether product of 'n' numbers is even or odd
Last Updated: 06 May 2025
Given an array arr[] of size n, the task is to check whether the product of the given n numbers is even or odd. Even product is even, return true, else false.Examples:Inpu...
read more
Bit Magic
Mathematical
DSA
integer-overflow
Bitwise-AND
Find larger of x^y and y^x
Last Updated: 19 December 2022
Given two integer numbers, X and Y. find the larger of X^Y and Y^X or determine if they are equal.Examples:Input : 2 3Output : 3^2We know 3^2 = 9 and 2^3 = 8.Input : 2 4Ou...
read more
Misc
Mathematical
DSA
maths-log
integer-overflow
Product of first N factorials
Last Updated: 11 July 2025
Given a number N. Find the product of first N factorials modulo 1000000007.Constraints: 1 ≤ N ≤ 1e6Examples:Input : 3Output : 12Explanation: 1! * 2! * 3! = 12 mod (1e9 + 7...
read more
Mathematical
DSA
factorial
Modular Arithmetic
integer-overflow
First digit in factorial of a number
Last Updated: 11 July 2025
Given a positive integer n, find the first digit in its factorial.Examples :Input : n = 5Output : 1Factorial of 5 is 120 and firstdigit is 1.Input : 1000Output : 4A simp...
read more
Misc
Mathematical
Technical Scripter
DSA
factorial
integer-overflow
Check for Integer Overflow
Last Updated: 26 March 2025
Given two integers a and b. The task is to design a function that adds two integers and detects overflow during the addition. If the sum does not cause an overflow, return...
read more
Bit Magic
DSA
integer-overflow
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 !