Pergunta de entrevista da empresa Amazon

Q: Implement a function to check if a binary tree is balanced. Q: How would you evaluate the performance of a recommendation system, like the ones used on Amazon?