Find the Element that Appears Once

Teiva Harsanyi
solvingalgo
Published in
Jun 27, 2020

Problem

  • Find the only element that appears once
In an unsorted array of integers, every element appears twice except for one element that appears only once. Return this element.Example:Input: a=[1, 4, 2, 4, 1, 3, 2]
Output: 3

Video:

Follow me on Twitter @teivah

--

--

Teiva Harsanyi
solvingalgo

Software Engineer @Google | 📖 100 Go Mistakes author | 改善