A wrapper class is used so that max_no can be updated among function calls .
public class Maximum { public int max_no = int . MinValue ; } public class BinaryTree { public Node root ; public Maximum max = new Maximum ( ) ; public Node target_leaf = null ;