Jan 3rd POTD || Easy and Understanding solution || C++ Solution
\nclass Solution {\npublic:\n    int numberOfBeams(vector<string>& bank) {\n        \n        int ans =0;\n        int prev = -1;\n        for(int i=0; i<bank.s
```\nclass Solution {\npublic:\n    int numberOfBeams(vector<string>& bank) {\n        \n        int ans =0;\n        int prev = -1;\n        for(int i=0; i<bank.size(); i++){\n            int count =0;\n            for(int j=0; j<bank[i].size(); j++){\n                if(bank[i][j]==\'1\'){\n                    count++;\n                }\n            }\n            if(prev == -1){\n                prev = count;\n            }\n            else if(count > 0){\n                ans += (prev*count);\n                prev =count;\n            }\n            \n        }\n        return ans;\n    }\n};\n```
['C']