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

How about this:

What is the most efficient algorithm to generate an N x N array of the integers 0,1,2, … such that each entry is the smallest such integer not appearing either above in the same column, or to the left in the same row?

Posting it in this thread is a bit of a spoiler :)

https://nicknash.me/2012/10/26/happy-halloween/




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: