Datadog Interview Question

DFS to find the maximum path.