GreedyEvidence Contributing
Greedy Min/Max Range Tracking
Track a running [lower, upper] bound of possible values while scanning, collapsing or rejecting when the range becomes invalid.
Practice Problems: 1
Difficulty: 0 Easy·1 Medium·0 Hard
Core technique
Review the technique, then try the mapped problems below. The right approach depends on each problem's constraints.
- Core Strategy: Track a running [lower, upper] bound of possible values while scanning, collapsing or rejecting when the range becomes invalid.