http://blog.csdn.net/xsl1990/article/details/8274028 linux目录架构/ 根目录/bin常用的命令binary file的目錄/boot存放系统启动时必须读取的档案,包括核心(kernel)在内 /boot/grub/menu.lst GRUB设...
分类:
系统相关 时间:
2014-10-30 20:52:10
阅读次数:
314
题目描述:
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
思路:采用类似折半查找的方式找到当前根节点,则当前根节点左边的属于它的左子树部分,当前根节点右边的属于它的右子树部分。再采用同样的方法,递归地对当前根节点的左右子树做相同的处理。
...
分类:
其他好文 时间:
2014-10-30 19:22:04
阅读次数:
197
Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:
其他好文 时间:
2014-10-30 10:55:20
阅读次数:
151
BSTTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8657Accepted: 5277DescriptionConsider an infinite full binary search tree (see the figure ...
分类:
其他好文 时间:
2014-10-30 09:27:09
阅读次数:
237
Binary codes
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 5647
Accepted: 2201
Description
Consider a binary string (b1…bN) with N binary digits. Given s...
分类:
其他好文 时间:
2014-10-29 14:59:04
阅读次数:
127
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...
分类:
其他好文 时间:
2014-10-29 14:20:43
阅读次数:
157
1 class Solution { 2 public: 3 int minDepth(TreeNode *root) { 4 if (root == nullptr) return 0; 5 if (root->left != nullptr&&root-...
分类:
其他好文 时间:
2014-10-29 12:08:21
阅读次数:
153
recursive 1 #include 2 #include 3 using namespace std; 4 5 struct TreeNode { 6 int val; 7 TreeNode *left; 8 TreeNode *right; 9 ...
分类:
其他好文 时间:
2014-10-29 10:20:20
阅读次数:
199
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100". 1 public class Solution { 2 public String ...
分类:
其他好文 时间:
2014-10-29 00:11:02
阅读次数:
245
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".思路简单(同Add Two Numbers),可从代码得知,需要注意字符在字符串中的插入;co...
分类:
其他好文 时间:
2014-10-28 23:59:02
阅读次数:
343