查找等差数列中的缺失项. e.g.Input: arr[] = {2, 4, 8, 10, 12, 14} Output: 6 Input: arr[] = {1, 6, 11, 16, 21, 31}; Output: 26. 采用binary search. 若是arr[mid] - arr[l ...
分类:
其他好文 时间:
2016-03-30 07:04:17
阅读次数:
121
原题链接在这里:https://leetcode.com/problems/binary-tree-vertical-order-traversal/ 题目: Given a binary tree, return the vertical order traversal of its nodes' ...
分类:
其他好文 时间:
2016-03-30 06:53:22
阅读次数:
154
设计模式:GOF23种设计模式,再加上非GOF的常用的设计模式,如简单工厂,表驱动、状态机、MVC 常见数据结构和算法:链表、动态数组、哈希表、顺序表、集合、二叉树,各种排序算法、查找算法 协议传输介质:XML、JSON、GPB、BINARY、MSGPACK TCP协议:HTTP\HTTPS\WEB ...
分类:
其他好文 时间:
2016-03-30 01:45:39
阅读次数:
195
如果需要某一个结构体,既在kernel space用,又在user space用,如 typedef struct { PVOID data; int size; }binary,pbinary; 上面这个binary的结构体,假设需要在Kenel space和user space同时用到,如通过k ...
分类:
其他好文 时间:
2016-03-29 23:51:58
阅读次数:
328
由于页面含有ImageView引起的内存溢出。 作如下处理:在OnDestroy中 ...
分类:
移动开发 时间:
2016-03-29 19:30:19
阅读次数:
212
高数, 基本的概率统计- 基本数据结构 能用JS写出linked list, stack, queue, (binary)tree, graph, hashtable么?- 基本算法 能用JS实现各种search(linear, binary..), 各种sort(bubble, insertion ...
分类:
其他好文 时间:
2016-03-29 00:55:17
阅读次数:
191
./hello.sh sh hello.sh grep -o world a.txt | wc -l a.txt 里 world 这个单词的次数 date -d '1970-01-01 UTC 1199116800 seconds' 1.grep -a :将binary文件以text文件的方式查找数 ...
分类:
系统相关 时间:
2016-03-28 23:21:13
阅读次数:
279
一开始作者搞了一个装满二进制的文件,用binary editor来制作。该软件下载地址http://www.vcraft.jp/soft/bz.html 当然,在我看来,这些二进制没什么意义,因为根本无法阅读。 但作者是想让读者了解cpu其实就是解读二进制指令的。 直接附上第一天的汇编代码: 无语的 ...
分类:
其他好文 时间:
2016-03-28 21:26:43
阅读次数:
138
原题链接在这里:https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-tree/ 题目: Given an array of numbers, verify whether it is the correct ...
分类:
其他好文 时间:
2016-03-28 07:08:30
阅读次数:
140
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia ...
分类:
其他好文 时间:
2016-03-28 07:03:15
阅读次数:
137