Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
cyphar
on Sept 9, 2016
|
parent
|
context
|
favorite
| on:
Regular Expression That Checks If A Number Is Prim...
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).
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: