We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a608b72 commit 65e3c5bCopy full SHA for 65e3c5b
Poor Pigs
@@ -0,0 +1,6 @@
1
+class Solution {
2
+ public int poorPigs(int buckets, int minutesToDie, int minutesToTest) {
3
+ int T = minutesToTest/minutesToDie;
4
+ return (int)Math.ceil(Math.log(buckets) / Math.log(T + 1));
5
+ }
6
+}
0 commit comments