Challenge: Find Max

Let’s find the maximum value in a BST.

Problem

Find the node with the maximum value in a BST.

Input

A BST.

Output

The node with the maximum value.

Sample input

Get hands-on with 1400+ tech skills courses.