Accelrys interview question

graph problem