the school cafeteria offer circular square sandwich lunch break refer number 0 1 respectively all student stand queue each student prefer square circular sandwichesThe number sandwich cafeteria equal number student the sandwich place stack at stepIf student queue prefer sandwich stack leave queueOtherwise leave queue endthis continue queue student want sandwich unable eatyou give integer array student sandwich sandwichesi type ith sandwich stack 0 stack studentsj preference jth student initial queue j 0 queue Return number student unable eat Example 1input student 1100 sandwich 0101output 0 Explanation Front student leave sandwich return end line make student 1001 Front student leave sandwich return end line make student 0011 Front student take sandwich leave line make student 011 sandwich 101 front student leave sandwich return end line make student 110 front student take sandwich leave line make student 10 sandwich 01 front student leave sandwich return end line make student 01 front student take sandwich leave line make student 1 sandwich 1 front student take sandwich leave line make student sandwich hence student able eatexample 2input student 111001 sandwich 100011output 3 constraints1 studentslength sandwicheslength 100studentslength sandwicheslengthsandwichesi 0 1studentsi 0 1