Topic: Dynamic Programming Problem / Level: intermediate

Problem: Solve the "Longest Zigzag Path in a Binary Tree" problem using dynamic programming.

Run the code to see the output here...