Most easy c++ solution
\n\n# Code\n\nclass Solution {\npublic:\n    int countStudents(vector<int>& students, vector<int>& sandwiches) {\n        stack<int> st;\n        queue<int> qu;
\n\n# Code\n```\nclass Solution {\npublic:\n    int countStudents(vector<int>& students, vector<int>& sandwiches) {\n        stack<int> st;\n        queue<int> qu;\n\n        for(int i = 0; i < students.size(); i++){\n            st.push(sandwiches[sandwiches.size() - 1 - i]);\n            qu.push(students[i]);\n        }\n        int n = 0;\n        while(!st.empty()){\n            if(st.top() == qu.front()) {\n                st.pop();\n                qu.pop();\n                n = 0;\n            } else {\n                qu.push(qu.front());\n                qu.pop();\n                n++;\n            }\n\n            if(n == qu.size()) break;\n        }\n        return qu.size();\n    }\n};\n\n```
['C++']