摘要: Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set toNULL.Initially, all next ... 阅读全文
posted @ 2015-03-14 23:39 desperadox 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return thepreordertraversal of its nodes' values.简单题,递归和迭代都可以解。 1 class Solution { 2 public: 3 vector preorderTraversal(TreeN... 阅读全文
posted @ 2015-03-14 23:18 desperadox 阅读(115) 评论(0) 推荐(0) 编辑