Amazon interview question

How to detect if two binary trees are the same