2403. Minimum Time to Kill All Monsters
ArrayDynamic ProgrammingBit ManipulationBitmask
Hints
Hint 1
Each monster can only have two states. They are either alive or dead.
Hint 2
We can use bitmasks to represent every possible combination of alive and dead monsters.
Hint 3
Let dp[mask] represent the minimum number of days needed to reach the state mask.
Preparing judge…