Available question text
Count the number of axis-aligned submatrices in a 2D grid of 'X', 'Y', and '.' that contain at least one 'X' and have an equal number of 'X' and 'Y' ('.' cells are ignored); grid sizes can be up to 1000×1000 so an efficient solution is required.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3212. Count Submatrices With Equal Frequency of X and Y
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source