Meta interview question

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