Flatiron Health Interview Question

about graph implementation, didn't get it