in reply to Re: Seeking the longest string in an array
in thread Seeking the longest string in an array
Change cmp to <=>.
Change /.../ to /\Q...\E/.
Change /.../ to /.../i.
O(N*log(N) + N2*M2). That's a worse worst case than the OP. In practice, though, yours would be faster, because the inner loop will be get much smaller than N very fast.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Seeking the longest string in an array
by mpeters (Chaplain) on Dec 12, 2004 at 02:41 UTC | |
by ikegami (Patriarch) on Dec 12, 2004 at 05:56 UTC | |
by mpeters (Chaplain) on Dec 13, 2004 at 15:22 UTC |