Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
cema
on July 16, 2009
|
parent
|
context
|
favorite
| on:
Regex to check for prime numbers
Brute force but works. The real trick, for me at least, was to convert the number into a sequence of 1's. The rest was like an exercise in programming Turing machines (and a nice flashback into the freshman year of college).
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: