LeetCode 268: Missing Number — Step-by-Step Visual Trace
Easy — Array | Bit Manipulation | Math
The Problem
Given an array nums containing n distinct numbers in the range [0, n], find the one number that is missing from this range.
Approach
Use XOR properties where a ^ a = 0 and a ^ 0 = a. Initialize with ...
blog.tracelit.dev1 min read