Fundamental Algorithms8 sections · 291 units
Open in CourseQuiz: Two Unique Numbers
Test your understanding
Check Your Understanding
In 'Single Number III' (two numbers appear once, rest twice), after XORing all numbers you get . How do you separate and ?
- A.Sort and scan for non-duplicates
- B.Find a set bit in , partition numbers by that bit, XOR each group
- C.Use a hash map
- D.Divide by 2 repeatedly