Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: Recognizing duplicates

by Sartak (Hermit)
on Oct 20, 2007 at 05:42 UTC ( [id://646137] : note . print w/replies, xml ) Need Help??

in reply to Re: Recognizing duplicates
in thread Recognizing duplicates

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.