Problem Statement
Deer Only has recently shed his antlers.
He is now ashamed and wants to make fake ones until the real ones grow back.
Deer Only has found a tree with N vertices.
The vertices are numbered 0 through N-1.
You are given two int[]s a and b that contain N-1 integers each.
These arrays describe the edges of the tree:
for each i, the vertices a[i] and b[i] are connected by an edge.
Deer Only has decided to make his new antlers out of this tree.
The only operation he is able to do is to remove some edges from his tree, producing several smaller trees.
Then, he wants to take two of the newly created trees and attach them to his head.
The two antlers must be isomorphic, otherwise he will be unbalanced when running.
(See Notes for a formal definition of tree isomorphism.)
Return the maximal size of the deer's new fake antlers.
The size of an antler is defined as the number of vertices in it.
Note that the largest possible antlers may sometimes consist only of a single vertex (and no edges).