For a given number n count trailing zeroes of n!
- Zero comes with 10 and
- 10 comes with multiplication of 2 and 5 multiples.
- And 2’s will always be higher than 5 multiple in n!
- so, count only number of 5.
- Iterate number from 5 to n
- Counter number for 5 occurred
Latest Source Code: