Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. (1) class Solution { public: int trailingZeroes(int n) { ; ; n / i; i *= ) { ans += n / i; } return ans; } }; (2) class Solu…