Google interview question

Given a binary tree, write a function that returns the length of the longest path (from any node to any node) in the tree.