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
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