Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 519. Random Flip Matrix
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.
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.