max distance in binary tree