PYTHON EASY WITH A SIMPLE LOGIC...
Intuition\n Describe your first thoughts on how to solve this problem. \nfirst we assume that the sandwiches in a form of stack, the top of stack start form rig
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nfirst we assume that the sandwiches in a form of stack, the top of stack start form right.\n# Approach\n<!-- Describe your approach to solving the problem. -->\nwe start loop so that the element come one by one from sandwiches[stack] come we the that element in students.\nAs we can see that we can circulate the student list. **If the element in students,remove it form the students**\n**if not present than break the loop**\nAs both students and sandwiches are in equal numbers. so we return the length of the students.\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nBig O(n^2)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n^2)\n\n# Code\n```\nclass Solution:\n    def countStudents(self, students: List[int], sandwiches: List[int]) -> int:\n        for i in sandwiches:\n            if i in students:\n                students.remove(i)\n            else:\n                break\n        return len(students)\n```
['Python3']