Amazon interview question

Leetcode Tree: Maximum path sum