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

There are at least two algorithms. The one you outline here feels more like the one I use (and, coincidentally, Art Benjamin[0][1][2] uses), whereas Conway used one of his own devising called the Doomsday Algorithm[3].

So you're right, it's not that hard, but be aware that you may not be thinking of the algorithm Conway used.

[0] https://en.wikipedia.org/wiki/Arthur_T._Benjamin

[1] https://math.hmc.edu/benjamin/

[2] https://www.ted.com/talks/arthur_benjamin_a_performance_of_m...

[3] https://en.wikipedia.org/wiki/Doomsday_rule




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: