XOR method is also interesting-
https://www.geeksforgeeks.org/find-the-missing-number/
64.3k questions
77.9k answers
244k comments
80.0k users