Courses
Tutorials
Practice
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
37.5K+ articles
DSA
22.8K+ articles
Python
21.3K+ articles
Misc
8.8K+ articles
Mathematical
7.8K+ articles
Bit Magic
1.2K+ 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: 16 April 2024
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
cpp-data-types
C++
C++ Programs
integer-overflow
Picked
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
integer-overflow
Bitwise-AND
DSA
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
Mathematical
maths-log
integer-overflow
DSA
Product of first N factorials
Last Updated: 01 March 2023
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
factorial
Modular Arithmetic
integer-overflow
DSA
First digit in factorial of a number
Last Updated: 27 January 2023
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
Mathematical
Technical Scripter
factorial
integer-overflow
DSA
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
integer-overflow
DSA
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 !