Indeed Interview Question

find the longest distance in BST