NeetCode #797LC-1921MediumGreedy
← Back to All Problems#797 · #1921 · Eliminate Maximum Number of Monsters(消灭怪物的最大数量)
📌 Problem Statement & Constraints
You are given
dist[i] (distance from the city) and speed[i] (speed per minute) for n monsters. Each minute you may eliminate one monster; a monster reaching the city ends the game. Return the maximum number of monsters eliminated. Constraints: 1 <= n <= 10^5, 1 <= dist[i], speed[i] <= 10^5.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!