Intel Corporation Interview Question

How to implement a graph