Leetcode 458. Poor Pigs
Given a number of buckets and limited time allowing repeated test rounds, determine the minimum number of pigs whose alive/dead outcomes across those rounds uniquely identify the single poisonous bucket. Key idea: each pig has (minutesToTest/minutesToDie + 1) possible outcomes (which round it dies in or survives), so find the smallest p with (rounds+1)^p >= buckets.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.