Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1349. Maximum Students Taking Exam
Place the maximum number of students on usable seats in an m×n grid so that no two are adjacent horizontally or diagonally between consecutive rows (to prevent left/right and upper-left/upper-right cheating), with broken seats unusable. With m,n ≤ 8, this is typically solved by enumerating valid row bitmasks and using DP over rows (bitmask compatibility / independent-set style).
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.