TuSimple interview question

Find a polynomial time algorithm to determine whether two trees are isomorphic.