DEV Community

Discussion on: De-duplicate arrays in Python, Perl and Ruby

Collapse
 
matthewpersico profile image
Matthew O. Persico

How is this O(1)? You are going to go through every element in @dups at least once.

Collapse
 
yukikimoto profile image
Yuki Kimoto - SPVM Author

Sorry. I misunderstood.