mkn-root12

Results 3 issues of mkn-root12

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

good first issue

//time: O(log(N)! * log(N)), space: O(log(N)) class Solution { public: void swap(vector& nums, int i, int j){ int t = nums[i]; nums[i] = nums[j]; nums[j] = t; }; bool isPowerOf2(vector&...