Hacker News new | past | comments | ask | show | jobs | submit login

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: