Snowflake Interview Question

Graph question, best path problem.