Saturday, February 3, 2018

Recursive function design talk

Feb. 3, 2018

Introduction


It is the third time I met the peer on mock interview platform. The peer worked on the algorithm root to leaf path sum minimum value, and then the peer explained to me his design in five minutes.

Tail recursion, local state, global state


The peer explained to me his idea of solving the problem. Local state is prefixSum variable, global state is minSum variable.

Here is the C# code.


No comments:

Post a Comment