Initial solution
Reorder test data
Add Regex note
More concise code
rename check_dup to is_dup?
manipulate array once
Avoid leak file description