Easy to understand


  • 0
    R

    int trailingZeroes(int n) {
    //Since number of 0's is determined by 2& 5 and you get more 5 than 2;
    int fC = 0;
    while(n){
    n/=5;
    fC+=n;
    }
    return fC;
    }


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.