Skip to content

Commit 3d0282c

Browse files
refactor 458
1 parent 289c233 commit 3d0282c

File tree

1 file changed

+0
-15
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-15
lines changed

src/main/java/com/fishercoder/solutions/_458.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 458. Poor Pigs
5-
*
6-
* There are 1000 buckets, one and only one of them contains poison,
7-
* the rest are filled with water.
8-
* They all look the same.
9-
* If a pig drinks that poison it will die within 15 minutes.
10-
* What is the minimum amount of pigs you need to figure out which bucket contains the poison within one hour.
11-
* Answer this question, and write an algorithm for the follow-up general case.
12-
13-
Follow-up:
14-
If there are n buckets and a pig drinking poison will die within m minutes,
15-
how many pigs (x) you need to figure out the "poison" bucket within p minutes? There is exact one bucket with poison.
16-
17-
*/
183
public class _458 {
194

205
public static class Solution1 {

0 commit comments

Comments
 (0)