Pregunta de entrevista de TuSimple

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