Study Notes
Problem editorialeasy

The first unique element

You cannot tell whether the first value is one-of-a-kind until you have seen the whole array. Learn the totals first, then walk in order.

19 min read·time O(N)·space O(N)
Two passesFrequency mapOrder preservation