Uber Interview Question

One graph problem and a greedy problem