Bitmasking | Detailed explanation
\nWe need to check all configurations of good and bad people and find out which one has maximum good people\n a person will be good, if and only if his statemen
<br/>\nWe need to check all configurations of good and bad people and find out which one has maximum good people\n<br/> a person will be good, if and only if his statements don\'t contradict\n<br/> i.e. if in our configuration person i is assumed to be good, then if he says person j is good then j should be good in\nour configuration and vise versa\n\n**Example:** \n```\nif there are 2 people\nthen possible configurations are\n00 - 0 bad 1 bad\n01 - 0 bad 1 good\n10 - 0 good 1 bad\n11 - 0 good 1 good\n```\n\nand for each of these configurations we will check if any statement contradicts or not\n<br/> if a person is bad in our configuration, then his opinion doesn\'t matter, so no need to check\n<br/> if a person i is good, then if statements[i][j] = 1 then j should be 1 in our configuration and \nif statements[i][j] = 0 then j should be 0 in our configuration\n<br/> so if any of above two statements contradict then our configuration / assumption is invalid and we will have to check for other configurations (make other assumptions)\n    \nand we will take the configuration that has maximum number of good people\n\n<br/>\n\n<iframe src="https://leetcode.com/playground/kVuWTkep/shared" frameBorder="0" width="940" height="600"></iframe>\n\n<br/>
['C', 'Bitmask']