Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
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.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.