剑指offer——二叉树的下一个节点
def GetNext(self, pNode): # write code here if not pNode: return pNode if pNode.right: left1=pNode.right while left1.left: left1=left1.left return left1 p=pNode while pNode.next: tmp=pNode.next if tmp.left==pNode: return tmp pNode=tmp