AlgoMaster Logo

Missing Number

nums=[3, 0, 1]
0 / 5
012301expected values 0..30123
algomaster.io
Step:nums holds 3 distinct numbers from 0..3, so exactly one is missing. XOR indices and values: everything pairs up except the missing number