Meta Interview Question

Design a function to find the longest path in a binary tree, other similar problems.