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