Once Twice
In an integer array one value occurs once, one occurs twice and every other value occurs three times. Return [the value seen once, the value seen twice] in linear time with constant extra space.
In an integer array one value occurs once, one occurs twice and every other value occurs three times. Return [the value seen once, the value seen twice] in linear time with constant extra space.