Given a 2D binary matrix `minerals` of size `m x n`, find the indices of the rows that contain the most diverse range of minerals. The diversity of a row is calculated by counting the number of unique minerals it contains.
Explanation: The first and fourth rows contain the most diverse range of minerals.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak