//返回两个链表的第一个公共节点
public Node FindFirstCommonNode(Node head1, Node head2) {
Node p1 = head1;
Node p2 = head2;
while (p1 != p2){
p1 = (p1 != null ? p1.next : head2);
p2 = (p2 != null ? p2.next : head1);
}
return p1;
}