Back to Archive
#60discrete
medium

Dead Men Walking

Source: CSEblog

Assume 100 zombies are walking on a straight line, all moving with the same speed. Some are moving towards left, and some towards right. If a collision occurs between two zombies, they both reverse their direction. Initially all zombies are standing at 1 unit intervals. For every zombie, you can see whether it moves left or right, can you predict the number of collisions?

Discussion

0

You must be logged in to participate in the discussion.

No comments yet. Be the first to start the conversation!