摘要:
Preorder: 因为是preorder traversal, 我们需要先print root,然后左节点,最后右节点,而且root左边子树一定比右边子树先print出来,所以,我们可以先把当前root的右节点压栈,然后把root的左节点压栈,这样每次从栈里取的时候,可以保证左边节点的root先取 阅读全文
posted @ 2016-08-06 02:47
北叶青藤
阅读(338)
评论(0)
推荐(0)
摘要:
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You shou 阅读全文
posted @ 2016-08-06 01:47
北叶青藤
阅读(190)
评论(0)
推荐(0)

浙公网安备 33010602011771号