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 n...
分类:
其他好文 时间:
2014-06-19 12:49:17
阅读次数:
301
线段树记录当前区间是哪一个长方形在覆盖。
然后根据每一条线更新线段树。
如果是左边的边,那么把区间更新成当前长方形。
否则,把区间更新成当前长方形的前驱。
#include
#include
#include
#include
#include
#include
#include
#include
#pragma comment(linker, "/STACK:1024000000,102...
分类:
其他好文 时间:
2014-06-16 11:26:00
阅读次数:
161
在终端输入:显示Mac隐藏文件的命令:defaults write
com.apple.finder AppleShowAllFiles -bool true隐藏Mac隐藏文件的命令:defaults write
com.apple.finder AppleShowAllFiles -bool fa...
分类:
其他好文 时间:
2014-06-16 11:13:39
阅读次数:
153
关于TCP/IP协议,建议参考Richard Stevens的《TCP/IP
Illustrated,vol1》(TCP/IP详解卷1)。关于第二层面,依然建议RichardStevens的《Unix network
proggramming,vol1》(Unix网络编程卷1),这两本书公认是Uni...
分类:
其他好文 时间:
2014-06-16 09:04:03
阅读次数:
170
#include #include using namespace std;int
main(int argc, char *argv[]){ deque A, B; deque ::iterator it; A.push_front(1);
B.push_back(1); ...
分类:
其他好文 时间:
2014-06-16 07:17:15
阅读次数:
199
class Solution {public: vector grayCode(int n)
{ vector res; res.push_back(0); long pow2 = 1; for (int i=1; i <= n; i++...
分类:
其他好文 时间:
2014-06-16 07:11:52
阅读次数:
213
intout_max_length_crease_str(constchar*p,std::vector&vct){ vct.clear(); intnlen=strlen(p); if(nlen==0){ return0; } if(nlen==1){ vct.push_back(p); r...
分类:
其他好文 时间:
2014-06-15 21:01:04
阅读次数:
178
Android Tasks and Back Stack...
分类:
其他好文 时间:
2014-06-14 06:45:51
阅读次数:
317
##RECORD,help me remember ###Make Lazy Version
Installer 1、Write this LazyVersion Installer DMG to a RAW empty disk 2、Use
Clover l...
分类:
其他好文 时间:
2014-06-13 15:27:01
阅读次数:
349