Human-readable, try all combinations of "assumed good" and validate
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nfunction maximumGood(statements: number[][]): number {\n  let knownMax = 0;\n  const n = statements.length;\n  const maxCombinations = 2 ** n;\n\n  const validate = (assumedGood: boolean[]) => {\n    for (let i = 0; i < n; i++) {\n      if (assumedGood[i]) {\n        for (let j = 0; j < n; j++) {\n          if (statements[i][j] === 0 && assumedGood[j]) {\n            return false;\n          }\n          if (statements[i][j] === 1 && !assumedGood[j]) {\n            return false;\n          }\n        }\n      }\n    }\n    return true;\n  };\n\n  for (let i = 0; i < maxCombinations; i++) {\n    // Let\'s start with all good assumptions, so we can start with the highest chance of being correct\n    const assumedGood: boolean[] = new Array(n)\n      .fill(1)\n      .map((_, j) => ((i >> j) & 1) === 0);\n    // console.info({ assumedGood });\n    const countGood = assumedGood.filter((a) => !!a);\n    // console.info({ countGood: countGood.length });\n    if (countGood.length <= knownMax) {\n      continue;\n    }\n    if (validate(assumedGood)) {\n      // console.info(\'is valid\');\n      knownMax = countGood.length;\n      // } else {\n      //     console.info(\'is invalid\');\n    }\n  }\n\n  return knownMax;\n}\n```
['TypeScript']