Syncro Medical interview question

How would you code a traffic system?