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.
In reply to Re^3: Combining arrays with grep/unless?
by ikegami
in thread Combining arrays with grep/unless?
by mdunnbass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |