Search
⌘K

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.

Comments

Your account is free and you can post anonymously if you choose.