in reply to Re: How do you find duplicates in a string?
in thread How do you find duplicates in a string?
Admittedly, this is not a very efficient solution for any significant amount of data.
For large — increasingly large — amounts of data, it's better than the regex with backref solution (e.g. as presented by davido). Put simply, the split-hash approach is O(n), whereas the regex-backref approach is O(n2)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How do you find duplicates in a string?
by Anonymous Monk on Sep 21, 2006 at 16:54 UTC | |
by davido (Cardinal) on Sep 21, 2006 at 18:50 UTC | |
by mk. (Friar) on Sep 21, 2006 at 17:27 UTC | |
by jdporter (Paladin) on Sep 21, 2006 at 20:17 UTC |