Search
⌘K

Leetcode 1921. Eliminate Maximum Number of Monsters

Given each monster's time-to-arrival (dist/speed) and the ability to kill one monster per minute starting at time 0, determine how many monsters you can eliminate before any monster's arrival time causes an unavoidable loss. This reduces to a scheduling/greedy problem: compute arrival times, sort by earliest deadline, and greedily assign one-minute kill slots to count how many monsters can be removed (n up to 1e5).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.