Using Backtracking beats 90%
\nclass Solution:\n    def maximumGood(self, statements: List[List[int]]) -> int:\n        good = set()\n        def backTracking(i):\n            if i == len(s
```\nclass Solution:\n    def maximumGood(self, statements: List[List[int]]) -> int:\n        good = set()\n        def backTracking(i):\n            if i == len(statements):\n                return 0\n            good.add(i) #Cosider i as good\n            mxmGood = float(\'-inf\')\n            found = 0\n            for j in range(i):\n                if (statements[i][j] == 1 and j not in good) or (statements[i][j] == 0 and j in good) or (j in good and statements[j][i] == 0):\n                    found = 1\n                    break\n            if not found:\n                mxmGood= max(mxmGood, 1 + backTracking(i+1))\n            good.remove(i) #Consider i as bad\n            found = 0\n            for j in range(i):\n                if (j in good and statements[j][i] == 1):\n                    found = 1\n                    break\n            if not found:\n                mxmGood= max(mxmGood, backTracking(i+1))\n            return mxmGood\n        return backTracking(0)\n            \n```
['Backtracking', 'Recursion', 'Python']