Microsoft Interview Question

2 technical q on graphs