Erlang Odd Occurrences In Array
-module(odd_occurrences_in_array).
-export([odd_occurrences_in_array/1]).
odd_occurrences_in_array(A) ->
lists:foldl(fun(X, Acc) -> Acc bxor X end, 0, A).
This uses XOR to cancel out pairs, leaving only the value that appears an odd number of times.