About this question

Trailing Zeros Implementation

Medium · Brainteasers · Quant Trader interview question · python, overflow, math, algorithms

You are auditing a helper function designed to calculate the number of trailing zeros in n!. The developer attempts to calculate the full factorial first and then count the zeros. What is the primary issue with the implementation below when n becomes very large (e.g., $n = 10,000$)?