Challenge: Find Max in Binary Tree

Let’s find the maximum value in a binary tree.

Problem

Given a binary tree, find the maximum value in it.

Input

A binary tree.

Output

Display the maximum value present in the tree.

Sample input

Get hands-on with 1400+ tech skills courses.