Write an algorithm which computes the number of trailing zeros in n factorial.
Have you met this question in a real interview?
Yes
Example
11! = 39916800, so the out should be 2
O(log N) time
s
时间: 2024-10-27 10:54:21
Write an algorithm which computes the number of trailing zeros in n factorial.
Have you met this question in a real interview?
Yes
Example
11! = 39916800, so the out should be 2
O(log N) time
s