Compute binary tree diameter | Meta Interview Question