Lonely Integer

  • + 0 comments

    //C#

    public static int lonelyinteger(List a) {

       int unique = 0;
       foreach (int n in a )
       {
         unique ^= n;
       }
       return unique;
    
    
    }