in reply to Re^2: Combining arrays with grep/unless?
in thread Combining arrays with grep/unless?
True, and the OP's isn't really O(N2) either. Both should factor in the length of the string. Both should factor the growth of the array/hash. Mine should also factor in bucket collisions when talking about worst case.
So, the OP's is O(N2 * L * O(Growth(N))) and mine is O(N * L * O(Growth(N))). I chose to ignore the common (and thus irrelevant) factor, even if accuracy suffered a little.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Combining arrays with grep/unless?
by polettix (Vicar) on Feb 10, 2007 at 01:06 UTC | |
by ikegami (Patriarch) on Feb 10, 2007 at 07:18 UTC | |
by polettix (Vicar) on Feb 11, 2007 at 15:38 UTC |