C++ Simple self explanatory code(You'll love it guaranteed.)
\nMY approach here is, traverse through sandwiches and check is there is any student who want that sandwich. if there is no one, then return count of remaining 
\nMY approach here is, traverse through sandwiches and check is there is any student who want that sandwich. if there is no one, then return count of remaining students. because we cannot shuffle sandwiches. hope you understood.\n\n```\nint countStudents(vector<int>& students, vector<int>& sandwiches) {\n\tint student_count = students.size(), circular_stu=0, square_stu=0;\n\tfor(int i=0; i<students.size(); i++){\n\t\tif(students[i] == 0){circular_stu++;}\n\t\telse{square_stu++;}\n\t}\n\tfor(int i=0; i<sandwiches.size(); i++){\n\t\tif(sandwiches[i] == 0){\n\t\t\tif(circular_stu > 0){\n\t\t\t\tstudent_count--;  // because he\'ll take it and leave the line.\n\t\t\t\tcircular_stu--;    // circular student is also gone.\n\t\t\t}\n\t\t\telse{return student_count;}\n\t\t}\n\t\telse{\n\t\t\tif(square_stu > 0){\n\t\t\t\tstudent_count--;\n\t\t\t\tsquare_stu--;\n\t\t\t}\n\t\t\telse{return student_count;}\n\t\t}\n\t}\n\treturn student_count;\n}\n```\n\nIf you have Learned something new please give it upvote;\notherwise thank you for having a look.\uD83D\uDE4F\uD83C\uDFFB\n\n\n.\n
[]