bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
MediumMath & GeometryLC 172

Factorial Trailing Zeroes

Given an integer n, return the number of trailing zeroes in n!. Note that n! = n (n - 1) (n - 2) ... 3 2 1.

Asked at 5 companies
AmazonBloombergFacebook
Hints
  • 1.Think about which data structure fits best
  • 2.Consider the time complexity of your approach
  • 3.Look for patterns in the constraints
LeetCode