Back before programmers were scum, I hired programmers based on intelligence. When they applied for a job, I gave them this problem. The indented text is mine. Roughly 1% of applicants solved it. Programmers from all backgrounds and all races solved it. The only category that never solved it is women.