Linux目录和Windows目录有着很大的不同,Linux目录类似一个树,最顶层是其根目录,如下图:
/bin
bin是binary的缩写。这个目录沿袭了UNIX系统的结构,存放着使用者最经常使用的命令。例如cp、ls、cat,等等。
/boot
这里存放的是启动Linux时使用的一些核心文件。
/dev
dev是device(设备)的缩写。这个目录下是所有L...
分类:
系统相关 时间:
2015-05-17 21:58:05
阅读次数:
182
https://leetcode.com/problems/add-binary/Add BinaryGiven two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"1...
分类:
编程语言 时间:
2015-05-17 21:48:42
阅读次数:
128
Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 ...
分类:
其他好文 时间:
2015-05-17 18:48:13
阅读次数:
118
Same Tree
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 and the nodes have the same value...
分类:
其他好文 时间:
2015-05-17 18:46:13
阅读次数:
93
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 1 class Solution { 2 public: 3 int l...
分类:
其他好文 时间:
2015-05-17 18:38:05
阅读次数:
87
class Solution {public:vector > res;public:void trval(TreeNode *root,int level){if(root==NULL)return;if(level==res.size()){vector v;res.push_back(v);}...
分类:
其他好文 时间:
2015-05-17 18:10:38
阅读次数:
92
二叉排序树(二叉排序树(Binary Sort Tree)又称二叉查找树(Binary Search Tree),亦称二叉搜索树。)或者是一棵空树,或者是具有下列性质的二叉树:(1)若左子树不空,则左子树上所有结点的值均小于它的根结点的值;(2)若右子树不空,则右子树上所有结点的值均大于或等于它的根...
分类:
其他好文 时间:
2015-05-17 16:32:27
阅读次数:
130
递归,求左右是否平衡,再判断高度差classSolution{public:boolisBalanced(TreeNode*root){//StarttypingyourC/C++solutionbelow//DONOTwriteintmain()functionintheight;returnhe...
分类:
其他好文 时间:
2015-05-17 16:30:19
阅读次数:
170
1.二分查找,找到value为target的一个元素的位置,找不到返回[-1,-1]
2.假设找到位置,且为index,分别向两边拓展即可。...
分类:
其他好文 时间:
2015-05-17 15:20:18
阅读次数:
85
1.变形的二分查找问题
2.最后A[mid]=target,index=mid
3.最后A[mid]!=target,又分A[mid]target两种情况,
4.if(A[mid]target),index=mid;...
分类:
其他好文 时间:
2015-05-17 15:18:22
阅读次数:
106