Skip to content

Instantly share code, notes, and snippets.

@xProgrammer-007
Created August 19, 2021 07:16
Show Gist options
  • Save xProgrammer-007/86dc126ce6a29c071bd026c54807b4d1 to your computer and use it in GitHub Desktop.
Save xProgrammer-007/86dc126ce6a29c071bd026c54807b4d1 to your computer and use it in GitHub Desktop.
class Solution:
def countStudents(self, stu: List[int], sand: List[int]) -> int:
c=0
for i in sand:
if i not in stu:
break
else:
c+=1
stu.pop(stu.index(i))
return len(sand)-c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment