Basic Queue implementation || easy || C++
\nThe students are checked with the top of the sandwiches if they meet the criteria (like both of them like circular->"0" & "0") then we will pop the student an
\nThe students are checked with the top of the sandwiches if they meet the criteria (like both of them like circular->"0" & "0") then we will pop the student and move ahead in sandwiches array. Otherwise take the student choice and push it to the end of the queue.\n\n```\nclass Solution {\npublic:\n    int countStudents(vector<int>& stu, vector<int>& sand) {\n        int i=0,cnt=0,j=0,n=stu.size();\n        queue<int>dq;\n        for(int it:stu)dq.push(it); \n        while(!dq.empty() && j<n*n){\n            if(dq.front()==sand[i]){\n                i++;\n                dq.pop();\n            }\n            else{\n                int t=dq.front();\n                dq.pop();\n                dq.push(t);\n            }\n            j++;\n        }        \n        \n        if(dq.empty())return 0;\n        else return dq.size();\n    }\n};\n```\n
['Queue', 'C', 'C++']