...

/

DIY: Maximum Difference Between Node and Ancestor

DIY: Maximum Difference Between Node and Ancestor

Problem statement

Given the root of a binary tree, find the maximum value, X, for which there exist two different nodes, A and B. X = |A.val - ...

Access this course and 1200+ top-rated courses and projects.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy