Microsoft interview question

2 technical q on graphs