摘要: preorder(node) if node == null then return visit(node) preorder(node.left) preorder(node.right)iterativePreorder(node) parentStack = empty stack parentStack.push(null) top = node while ( top != null ) visit( top ) if ( top.right != null ) parentStack.push(top.right) ... 阅读全文
posted @ 2014-03-19 13:38 cavehubiao 阅读(181) 评论(0) 推荐(0)