测试用例不全
二叉树的下一个结点
http://www.nowcoder.com/questionTerminal/9023a0c988684a53960365b889ceaf5e
牛客测试用例不全,这也能通过,建议增加测试用例
class Solution: def GetNext(self, pNode): # write code here if not pNode: return pNode if pNode.right: left = pNode.right while left.left: left = left.left return left if pNode.next: if pNode.next.left == pNode: return pNode.next if pNode.next.next: if pNode.next.next.left and pNode == pNode.next.next.left.right: return pNode.next.next return None