Lonely Integer

  • + 0 comments

    public static int lonelyinteger(List a) { // Write your code here int unique = 0;

        for(int i : a){
            unique = unique ^ i;
        }
        return unique;
    }