Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2151. Maximum Good People Based on Statements
Given an n×n matrix of statements where "good" people always tell the truth and "bad" people can lie, find the largest set of people that can be labeled good such that every statement made by any labeled-good person is consistent with those labels. Core challenge: check consistency for each candidate subset (bitmask/subset enumeration) and maximize the number of goods.
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.