LeetCode
ฝัง
- เผยแพร่เมื่อ 7 ก.พ. 2025
- Leetcode 172 Link: leetcode.com/p...
Trailing Zeros in Factorial is a coding interview question asked in Mircosoft Interview
Question:- Given an integer n, return the number of trailing zeroes in n!
Example 1:
Input: 3
Output: 0
Explanation: 3! = 6, no trailing zero.
Example 2:
Input: 5
Output: 1
Explanation: 5! = 120, one trailing zero.
Github Link for Python Code:- github.com/net...
#trailingzero #Factorial #python
excellent explaination i have ever seen , thank you mam for this video
My Pleasure 🙂
Good solution, thanks.
Unfortunately, this is one of those problems where if you know the formula, then you can solve the problem. Else it simply doesn't work for you efficiently.
akrens of 5
Why here we are calculating occurrence only 5's.
Your logic is not clearing all test cases in leetcode
github.com/netsetos/python_code/blob/master/Capture.PNG All Test Cases Passed. Check your Code Once