Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: Recognizing duplicatesby Sartak (Hermit) |
on Oct 20, 2007 at 05:42 UTC ( [id://646137]=note: print w/replies, xml ) | Need Help?? |
Actually, the hash based solution is roughly O(length) time. It's (approximately) a constant amount of time to insert/index into the hash, and you only iterate over the string once.
In Section
Seekers of Perl Wisdom
|
|