Introduction
It is very interesting to practice binary tree path sum with the same value. Julia did the practice in 2016. Today she did practice twice, first she rewrote the algorithm better to represent her understanding the algorithm - the recursive function.
And then she practice mocking experience, she wrote an extended algorithm to find the minimum path sum from root to leaf, the return value is the minimum path sum and also return the path.
Code practice
3 practices:
July 28, 2016, C# practice
June 14, 2017, C# practice
June 14, 2017 9:49pm - C# practice
In 3rd practice, Julia was asked to extend the algorithm in the mocking experience, add the minimal sales path to the output as well.
It is again the opportunity to practice how DFS works, use a string variable to track all the nodes in the path.
No comments:
Post a Comment