Search
⌘K

Leetcode 1996. The Number of Weak Characters in the Game

Count how many characters (attack, defense) are strictly dominated by another character with both attack and defense greater. With up to 1e5 pairs this requires better than O(n^2) — a common approach is to sort by attack and scan while tracking the best defense seen to identify dominated pairs.


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.