use inequality to explain why choose factor 3 but not 2 or 4.


  • 0
    S

    Assume an integer x that x = 3n and x = 4m, so we got: n = m4/3 ;
    Compare the product : 3^n ~ 4^m; replace n, we got:
    3^(4/3) ~ 4^m;
    add log: m
    4/3*log(3) ~ m * log(4) => 4/3log(3) ~ log(4). apparently, the left side is bigger than the right, so we choose factor 3.


Log in to reply
 

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