Available question text
Implement a class that repeatedly returns and flips a uniformly random unpicked cell (i, j) from an m×n zero-initialized binary matrix and can reset the matrix. Each flip must pick every remaining zero cell with equal probability while minimizing calls to the random function and optimizing time and space per operation.
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 519. Random Flip Matrix
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source