Google Interview Question

2 algorithm tasks (graph and dynamic)