Sponsored
Use these hints if you're stuck. Try solving on your own first.
Create this function maxZigZag(node, direction) maximum zigzag given a node and direction (right or left).
Solve with full IDE support and test cases