摘要: 1 data;20 21 #左节点先入队,然后右节点入队22 if ($cnode->left != null) array_unshift($queue, $cnode->left);23 if ($cnode->right != null) array_unshift($queue, $cnode->right);24 }25 26 return $traverse_data;27 }28 29 #深度优先遍历,使用一个栈实现30 funct... 阅读全文
posted @ 2014-03-03 10:37 此间少年~阳 阅读(295) 评论(0) 推荐(0)