BFS C++ simple code
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```cpp []\nclass Solution {\npublic:\n    int minMalwareSpread(vector<vector<int>>& graph, vector<int>& initial) {\n        int m=initial.size();\n        int ans=-1;\n        int maxi=1e9;\n        sort(initial.begin(),initial.end());\n        for(int i=0;i<m;i++){\n            int count=0;\n            queue<int>q;\n            vector<bool>vist(graph.size(),false);\n            for(int k=0;k<m;k++){\n                if(k!=i){\n                    q.push(initial[k]);\n                    vist[initial[k]]=true;\n                    count++;\n                }\n            }\n            while(!q.empty()){\n                int node=q.front();\n                q.pop();\n                for(int j=0;j<graph.size();j++){\n                    if(graph[node][j]==1&&j!=node&&j!=initial[i]&&!vist[j]){\n                        vist[j]=true;\n                        q.push(j);\n                        count++;\n                    }\n                }\n            }\n            cout<<count<<\',\';\n            if(count<maxi){\n                ans=initial[i];\n                maxi=count;\n                \n            }\n        }\n        return ans;\n    }\n};\n```
['C++']