4、归并排序
4.1算法思想——
将数组分为两半,对每部分递归地应用归并排序,直到最后的子数组只包含一个元素。在每部分都排好序后,对它们进行合并。
4.2
时间复杂度——
假如用T(n)表示使用归并排序对n个元素构成的数组进行排序而使用的时间,用mergeTime来表示将两个子分组合并起来而花费的时间。那么
T(n)
= T(n/2)+T(n/2) + mergetime
而me...
分类:
其他好文 时间:
2014-07-22 22:38:33
阅读次数:
189
一 Words1 draw in 渐短,渐早 e.g. The days draw in and the mornings get darker.天黑得越来越早,天亮得越来越晚。 被卷入,使参与 e.g. You gradually fall under the spell 咒语and get dr...
分类:
其他好文 时间:
2014-07-22 22:36:34
阅读次数:
203
属性监视器
属性监视器监控和响应属性值的变化,每次属性被设置值的时候都会调用属性监视器,甚至新的值和现在的值相同的时候也不例外。
可以为除了延迟存储属性之外的其他存储属性添加属性监视器,也可以通过重载属性的方式为继承的属性(包括存储属性和计算属性)添加属性监视器。属性重载请参考继承一章的重载。
注意:
不需要为无法重载的计算属性添加属性监视器,因为可以通过 setter ...
分类:
其他好文 时间:
2014-07-22 14:36:36
阅读次数:
475
Kindergarten Counting GameEverybody sit down in a circle. Ok. Listen to me carefully.``Woooooo, you scwewy wabbit!''Now, could someone tell me how man...
分类:
其他好文 时间:
2014-07-22 00:37:36
阅读次数:
248
eclipse导入工程时出现了如下问题:Invalid project description. /Users/yang/Documents/workspace/BarCodeTest overlaps the location of another project: 'BarCodeTest'原因...
分类:
移动开发 时间:
2014-07-22 00:03:34
阅读次数:
301
Help Me with the Game
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3344
Accepted: 2145
Description
Your task is to read a picture of a chessboard positi...
分类:
其他好文 时间:
2014-07-21 23:38:44
阅读次数:
265
KVC实现原理
在iOS中,通过KVC可以直接用字符串的名字(key)来访问类属性的机制。而不是通过调用Setter、Getter方法访问。
KVC是KVO、Core Data、CocoaBindings的技术基础,他们都是利用了OC的动态性。
关于KVC的使用方法,...
分类:
其他好文 时间:
2014-07-21 16:47:13
阅读次数:
435
Lesson 11 excuse [ik'skju:z] v.原谅2 me [mi:, mi] pron.我(宾格)3 yes [jes] ad.是的4 is [iz, s, z, ?z] v.be动词现在时第三人称单数5 this [ðis] pron.这6 your [j?:, j?:, j?r...
分类:
其他好文 时间:
2014-07-21 14:29:27
阅读次数:
541
1、ServletActionContext.getServletContext().getRealPath("/")得到:C:\Users\JL\Workspaces\.metadata\.me_tcat\webapps\HuiLife\ServletActionContext.getServle...
分类:
移动开发 时间:
2014-07-21 09:35:13
阅读次数:
267
一般形式:基类型 **变量名;例如:char **p;void main(){ char *name[] = {"Follow me","Basic","Great Wall","FORTRAN","Computer design"}; char **p; int i; fo...
分类:
编程语言 时间:
2014-07-21 09:33:30
阅读次数:
235