Re:Regular Expression That Checks If A Number Is Prime
by cyphar on Thursday September 08, 2016 @11:57PM
(#12459548)
Horrific. It's implicitly checking for every divisor (which is O(n)) but there's also the complexity from using a regex engine (which can be O(n*m)). So the overall complexity is probably of the order O(n^2).
[ Parent
| on HN ]
There are no comments on this comment yet.