Got this recently:
How would you design a data structure for the game Tic Tac Toe? The main objective is to provide: A method, as efficient as possible, for checking the board to see if there is a winner.
another place where certain patterns of firing neurons have been translated into English and stored for public perusal.
The question was posed roughly like this:
Suppose there is a very long road. Suppose there is a sequence of cars, C1, C2, C3, … that each move with its own constant speed that is such that C1 is slower than C2 which is slower than C3, and so on. The cars enter the road in the same sequence (C1 then C2 etc.) but at random locations. They are not allowed to overtake each other, so if a faster car catches up to a slower one, the faster must reduce speed and fall in behind.
After some time, how many groups of cars will there be on the road?