Created
May 17, 2020 15:46
-
-
Save remi-bruguier/3a3b70045f81085cb3e0fba944406f1f to your computer and use it in GitHub Desktop.
Given a list of numbers, where every number shows up twice except for one number, find that one number.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uniqueNumber = (arr:number[]):number => arr.reduce((x,y) => x^y); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment