大家从店里定的Nexus 7收到了么# PDA - 掌中宝
i*c
1 楼
M公司的,上次懒,没整理完就没发
1)
Given two trees, a node in one tree matches a node in the other tree if
their paths (from root) contain the same
labels in the same order.
1) given two trees, find all matched nodes.
2) given two trees, find the largest matched subtrees (each node in one
subtree has a matched node in the other
subtree, and the order of the sibling nodes in two subtrees is the same)
example:
tree 1)
A is root, has children from left to right (B C D E)
tree 2)
A is root, has children from left to right (F B D C)
Some matched subtrees are:
A (B C)
or A (B D)
or A (B)
or A (C)
or A (D)
but A (C D) is not matched because order of C D is different in two trees
1)
Given two trees, a node in one tree matches a node in the other tree if
their paths (from root) contain the same
labels in the same order.
1) given two trees, find all matched nodes.
2) given two trees, find the largest matched subtrees (each node in one
subtree has a matched node in the other
subtree, and the order of the sibling nodes in two subtrees is the same)
example:
tree 1)
A is root, has children from left to right (B C D E)
tree 2)
A is root, has children from left to right (F B D C)
Some matched subtrees are:
A (B C)
or A (B D)
or A (B)
or A (C)
or A (D)
but A (C D) is not matched because order of C D is different in two trees