Given an array containing n distinct numbers taken from the range [0, n], return the one number in that range that is missing from the array.
nums = [3,0,1]2nums = [9,6,4,2,3,5,7,0,1]8Solve it in the editor. Sign in free to run your Python or JavaScript against test cases, get a verdict, and track your attempts.
Solve on FeatCode →Work directly on a number's binary representation using bitwise operators — often turning an O(n) or O(log n) problem into a handful of O(1) operations.
Read the full Bit Manipulation guide →
Original problem on LeetCode ↗