From ec18d6f301734199f032a2d91a99632d99556ff4 Mon Sep 17 00:00:00 2001 From: haiker2011 Date: Thu, 27 Sep 2018 20:38:17 +0800 Subject: [PATCH] update the format --- notes/面试总结.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/notes/面试总结.md b/notes/面试总结.md index a03e93d3..b3e18aff 100644 --- a/notes/面试总结.md +++ b/notes/面试总结.md @@ -538,23 +538,23 @@ public TreeLinkNode GetNext(TreeLinkNode pNode) { ```python def GetNext(self, pNode): - # write code here - # pNode is None - if not pNode: - return pNode - if pNode.right: - node = pNode.right - while node.left: - node = node.left - return node - else: - while pNode.next: - parent = pNode.next - if parent.left == pNode: - return parent - pNode = pNode.next - # pNode not have the next node - return None + # write code here + # pNode is None + if not pNode: + return pNode + if pNode.right: + node = pNode.right + while node.left: + node = node.left + return node + else: + while pNode.next: + parent = pNode.next + if parent.left == pNode: + return parent + pNode = pNode.next + # pNode not have the next node + return None ``` # 9. 用两个栈实现队列