Reserved space (invalid address) is protected against abnormal access. Reads from invalid address return garbage; writes to invalid address are blocked. Access to reserved space can generate exception...
分类:
其他好文 时间:
2014-06-20 11:58:31
阅读次数:
260
选择你的引擎
你能用的数据库引擎取决于MySQL在安装的时候是如何被编译的。要添加一个新的引擎,就必须重新编译MySQL。仅仅为了添加一个特性而编译应用程序的概念对于Windows的开发人员来说可能很奇怪,但是在UNIX世界里,这已经成为了标准。在缺省情况下,MySQL支持三个引擎:ISAM、MyISAM和HEAP。另外两种类型InnoDB和Berkley(BDB),也常常可以使用。...
分类:
数据库 时间:
2014-06-20 10:58:25
阅读次数:
252
1、
??
Recover Binary Search Tree
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 pretty...
分类:
其他好文 时间:
2014-06-20 10:13:49
阅读次数:
243
官方帮助http://space.cnblogs.com/forum/topic/8550
注:如果自动配置没有成功,需要手动配置: a) 在“Type of weblog that you are
using”中选择“Custom(Metaweblog API)”。b) “Remote posti...
最简单的方法是将n个元素排序,取出最小的k个元素。这个算法的时间复杂度为
O(nlgn)。然而在输入的n个元素互异的情况下,利用最大堆,我们可以获得时间复杂度为 O(nlgk)的算法。 1 #include 2 3 #define N
128 4 5 int heap[N], max_s...
分类:
其他好文 时间:
2014-06-11 10:49:23
阅读次数:
220
Follow up for "Unique Paths":Now consider if
some obstacles are added to the grids. How many unique paths would there be?An
obstacle and empty space i...
分类:
其他好文 时间:
2014-06-08 00:33:42
阅读次数:
339
上一篇中介绍了内存管理的思路和算法,我们已经可以动态申请和释放内存了。这不就是堆(Heap)么。在此基础上,本篇要做一段程序,一并解决窗口和鼠标的叠加处理问题。
分类:
其他好文 时间:
2014-06-07 17:00:16
阅读次数:
196
题目
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
For example, given
s = "leetcode",
dict =...
分类:
其他好文 时间:
2014-06-07 13:53:28
阅读次数:
247
1. 普通的二分查找2. 查找最左边的值3. 查找最右边的值Worst case
performance: O(log n)Best case performance: O(1)Average case performance: O(log
n)Worst case space complexity...
分类:
其他好文 时间:
2014-06-07 11:19:48
阅读次数:
248
Given a sorted array, remove the duplicates in
place such that each element appear only once and return the new length.Do not
allocate extra space for...
分类:
其他好文 时间:
2014-06-06 06:53:19
阅读次数:
347