1. Maintain 3 variables - ld,rd and rtd - one to store the maximum element across the left set of nodes, the other to store the maximum element across right set of nodes and the third to store the root element.
2. Assign findMax(root.left) to ld.
3. Assign findMax(root.right) to rd.
4. And root data to rtd.
5. Compare these 3 variables and return the max of the three.