added duplicates elimination solutions with tests