摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
posted @ 2014-05-07 23:15 一弦一仙 阅读(120) 评论(0) 推荐(0) 编辑
摘要: http://oj.leetcode.com/problems/balanced-binary-tree/http://blog.csdn.net/fightforyourdream/article/details/18693131Given a binary tree, determine if ... 阅读全文
posted @ 2014-05-07 22:55 一弦一仙 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST./** * Definition for binary tree * public class TreeN... 阅读全文
posted @ 2014-05-07 22:08 一弦一仙 阅读(154) 评论(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 exa... 阅读全文
posted @ 2014-05-07 21:56 一弦一仙 阅读(146) 评论(0) 推荐(0) 编辑
摘要: http://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node/Given a binary tree struct TreeLinkNode { TreeLinkNode *left; ... 阅读全文
posted @ 2014-05-07 21:25 一弦一仙 阅读(159) 评论(0) 推荐(0) 编辑