Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 379 Bytes

README.md

File metadata and controls

12 lines (8 loc) · 379 Bytes

<< [40] Find the non-duplicated integer >>

Given an array of integers where every integer occurs three times except for one integer, which only occurs once, find and return the non-duplicated integer. Do this in O(N) time and O(1) space.

Examples:

>>> coding_problem_40([6, 1, 3, 3, 3, 6, 6])
1

>>> coding_problem_40([13, 19, 13, 13])
19