Datadog interview question

DFS to find the maximum path.