I think that's actually O(N^2)
You may be right; I wasn't careful with my analysis of the speed of the algorithm, other than in terms of how to improve it.
which, although not blazingly fast, is much, much faster than O(N!)
No joking.
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
In reply to Re: Quicker Array Searching
by jonadab
in thread Quicker Array Searching
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |