Back to all patterns

Math

2 problems • Practice on LeetCode to earn credits

About This Pattern

Master the Math pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.

Medium (2)

Reverse Integer

Reverse digits of a signed 32-bit integer.

Key Signals:

Extract digitsBuild reversedCheck overflow
Factorial Trailing Zeroes

Given an integer n, return the number of trailing zeroes in n!.

Key Signals:

Factorial propertiesCount factors of 5Mathematical insight