C++ | STL
Simple solution involving a bunch of STL algorithm functions.\n\n\nclass Solution {\npublic:\n    \n    int countStudents(vector<int>& students, vector<int>& sa
Simple solution involving a bunch of STL algorithm functions.\n```\n\nclass Solution {\npublic:\n    \n    int countStudents(vector<int>& students, vector<int>& sandwiches) \n    {\n        int initialCount = students.size();\n        int count = 0;\n        \n        while(students.size() > 0 )\n        {\n            if(students[0] == sandwiches[0])\n            {\n                count++;\n                students.erase (begin(students),begin(students)+1);\n                sandwiches.erase (begin(sandwiches),begin(sandwiches)+1);\n            }\n            else\n            {\n                auto it = find(students.begin(),students.end(),sandwiches[0]);\n                if(it == end(students))\n                    break;\n                rotate(students.begin(),it,students.end());\n            }\n        }\n        \n        return (initialCount - count);\n    }\n};\n```
['C']