Question: 2 0 . Saddle Point: Input: A binary tree T in which each node x contains a field value ( [ x ]

20. Saddle Point:
Input: A binary tree T in which each node x contains a field value \([x]\) which is a real number.
We say a node x in T is a saddle point if x has minimum value among all its ancestors (including x ), but it has maximum value among all its descendants (including x ).
Output: A saddle point of T if there is one, or null if there isn't.
2 0 . Saddle Point: Input: A binary tree T in

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!