🔥🔥🔥C++ | super easy | clean code | beginner friendly🔥🔥🔥
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```\nclass Solution {\nprivate:\n    int countMax(string& s, vector<vector<int>>& stats){\n        int n = s.size();\n        int cnt = 0;\n        for(int i=0; i<n; i++){\n            if(s[i] == \'0\') continue;\n            cnt++;\n            for(int j=0; j<n; j++){\n                if(stats[i][j] == 1 && s[j] == \'0\') return 0;\n                if(stats[i][j] == 0 && s[j] == \'1\') return 0;\n            }\n        }\n        return cnt;\n    }\nprivate:\n    int solver(int i, string s, vector<vector<int>>& stats){\n        if(i == stats.size()){\n            return countMax(s,stats);\n        }\n\n        int good = solver(i+1,s+\'1\',stats);\n        int bad = solver(i+1,s+\'0\',stats);\n\n        return max(good,bad);\n    }\npublic:\n    int maximumGood(vector<vector<int>>& statements) {\n        \n        return solver(0,"",statements);\n    }\n};\n```
['C++']