上一页 1 ··· 58 59 60 61 62 63 64 65 66 ··· 84 下一页
摘要: Ubuntu 下配置 Git 是一个快速、可扩展的分布式版本控制系统,它具有极为丰富的命令集,对内部系统提供了高级操作和完全访问。 一、Git安装: 1、 二进制方式安装: $ sudo apt-get install git-core 安装完成后,在终端中输入 git 就可以看到相关的命令了。如果 阅读全文
posted @ 2015-04-10 11:29 穆穆兔兔 阅读(322) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo... 阅读全文
posted @ 2015-04-10 10:48 穆穆兔兔 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth... 阅读全文
posted @ 2015-04-09 16:58 穆穆兔兔 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.Hide TagsDepth-first SearchLinked List方法一... 阅读全文
posted @ 2015-04-09 15:50 穆穆兔兔 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST.Hide TagsTreeDepth-first Search方法一:递归,也是dfs/** * Defi... 阅读全文
posted @ 2015-04-09 15:31 穆穆兔兔 阅读(139) 评论(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 al... 阅读全文
posted @ 2015-04-08 17:26 穆穆兔兔 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 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 is ... 阅读全文
posted @ 2015-04-03 11:23 穆穆兔兔 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3="... 阅读全文
posted @ 2015-04-02 17:15 穆穆兔兔 阅读(232) 评论(0) 推荐(0) 编辑
摘要: Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni... 阅读全文
posted @ 2015-04-02 16:44 穆穆兔兔 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1... 阅读全文
posted @ 2015-04-02 16:02 穆穆兔兔 阅读(156) 评论(0) 推荐(0) 编辑
上一页 1 ··· 58 59 60 61 62 63 64 65 66 ··· 84 下一页