Find the maximum path sum from root to leaf in a binary tree.

This problem asks you to find the maximum path sum from the root to a leaf in a binary tree. An example input and output are given.

Problem

Given a binary tree, find the maximum path sum from root to leaf.
Example input:
[4, -1, 3]
Example output:
7

Solution

This solution is in C#. Our A.I. can create solutions in multiple languages.
by kayakane
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InterviewPreperationGuide.Core.CrackingTheCodingInterview.c4q8 {
    public class Solution {
        public void Init () {
            Console.WriteLine ();
        }
    }
}

A.I. Evaluation of the Solution

The candidate's solution does not demonstrate a level of completeness and does not solve the problem. The approach is not clear.

Evaluated at: 2022-11-28 10:15:22