Find no. appearing exactly once in an array where other elements occur twice