Single number HashMap approach

Instead using XOR, use HM to check the unique of number