Solution #18: Maximum path sum I