2
public int countStudents(int[] students, int[] sandwiches) {3
int ones = 0; // count of students who prefer type14
int zeros = 0; // count of students who prefer type06
for (int stud : students) {7
if (stud == 0) zeros++;11
// for each sandwich in sandwiches12
for (int sandwich : sandwiches) {13
if (sandwich == 0) { // if sandwich is of type014
if (zeros == 0) { // if no student want a type0 sandwich18
} else { // if sandwich is of type119
if (ones == 0) { // if no student want a type1 sandwich