C++ Single line Solution


  • 0
    A

    class Solution {
    public:
    int poorPigs(int buckets, int minutesToDie, int minutesToTest) {
    return ceil(log(buckets)/log(minutesToTest/minutesToDie+1));
    }
    };


Log in to reply
 

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