上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 28 下一页

2015年5月15日

摘要: 题目:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical... 阅读全文
posted @ 2015-05-15 08:39 承续缘 阅读(277) 评论(0) 推荐(0) 编辑

2015年5月14日

摘要: 题目:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space ... 阅读全文
posted @ 2015-05-14 22:34 承续缘 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and... 阅读全文
posted @ 2015-05-14 11:17 承续缘 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For ... 阅读全文
posted @ 2015-05-14 10:18 承续缘 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,... 阅读全文
posted @ 2015-05-14 09:59 承续缘 阅读(212) 评论(0) 推荐(0) 编辑

2015年5月13日

摘要: 题目:Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1]... 阅读全文
posted @ 2015-05-13 22:57 承续缘 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].N... 阅读全文
posted @ 2015-05-13 20:56 承续缘 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].... 阅读全文
posted @ 2015-05-13 20:00 承续缘 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 刷题进入到二叉树这个章节,开篇随笔记录下二叉树相关的内容:二叉树的各种遍历和操作:http://blog.csdn.net/fansongy/article/details/6798278二叉搜索树(BST)的插入、查找、删除:http://segmentfault.com/a/1190000002... 阅读全文
posted @ 2015-05-13 19:32 承续缘 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目:Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another expr... 阅读全文
posted @ 2015-05-13 14:46 承续缘 阅读(116) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 28 下一页

导航