⭐ Easy C++ Solution ⭐ |   Queue  |   O(n)
\nclass Solution {\npublic:\n    int countStudents(vector<int>& students, vector<int>& sandwiches) {\n        queue<int>q;\n        for(auto s:students){\n     
```\nclass Solution {\npublic:\n    int countStudents(vector<int>& students, vector<int>& sandwiches) {\n        queue<int>q;\n        for(auto s:students){\n            q.push(s);\n        }\n        int i=0, c=0;\n        while(i<sandwiches.size()){\n            if(sandwiches[i]==q.front()){\n                q.pop();\n                i++;\n            } else {\n                int x=q.front();\n                q.pop();\n                q.push(x);\n            }\n            c++;\n            if(c==10001)\n                break;\n        }\n        return q.size();\n    }\n};\n```
['Queue', 'C']