Intel Corporation interview question

How to implement a graph