Tuesday, October 2, 2007

Assignment 1: Stimulating line que

Write code to stimulate following:
There are 1,000 people in a room, each person has unique number from 1 to 1000. When number is drawn person with that number will move out of room. Stop when there is no more people in room.

Do:
Write a code to stimulate this process and output the sequence of people being moved out (print their numbers).
Code needs to be efficient.
No memory leaks, only generate 1000 people to move 1000 people.

That's problem, I will post code tommorow.

No comments: