Given a binary tree, find the maximum/minimum element in the tree?
Traverse to the left most element... It gives you the minimum... Similarly if you traverse to the right most element, it ll give you the maximum value
Find the maximum/mininum element of a binary tree?
Traverse to the left most element... It gives you the minimum...
Similarly if you traverse to the right most element, it ll give you the maximum value