Problem Description:
Sort a linked list in O(n log n)
time using constant space complexity.
分析:对链表进行排序,思考排序算法时间复杂度为O(nlogn)的只有归并,快排和堆排序,应用到链表上的归并比较合适,这里利用快慢指针找到链表的中间节点,然后分别对两边递归归并排好序后将两边归并即可得到最终...
分类:
其他好文 时间:
2014-08-13 22:25:57
阅读次数:
234
转帖:http://blog.chinaunix.net/space.php?uid=11654074&do=blog&id=2857384Contents Page文件夹入木三分学网络第一篇--VRRP协议具体解释... 11. VRRP产生背景及应用环境... 21.1为什么要用VRRP. 22...
分类:
其他好文 时间:
2014-08-13 22:18:47
阅读次数:
785
1. 在Finder中打开Adobe Flash Builder 4.7的安装目录2. 在Adobe Flash Builder 4.7.app上点击右键“Show Package contents”(显示包内容)3. 定位到Contents/MacOS目录下4. 用文本编辑打开Adobe Flas...
分类:
编程语言 时间:
2014-08-13 22:00:47
阅读次数:
196
执行apachectlstart时,error_log报错如下:[warn]pidfile/usr/local/zend/apache2/logs/httpd.pidoverwritten--UncleanshutdownofpreviousApacherun?
[emerg](28)Nospaceleftondevice:Couldn‘tcreateacceptlock(/usr/local/zend/apache2/logs/accept.lock.11056)(5)如果启动ap..
分类:
其他好文 时间:
2014-08-13 15:21:17
阅读次数:
197
坐标系统
坐标系统在Unity3D开发过程中具有非常重要的作用,是游戏对象定位、移动、缩放、旋转等操作的基础。坐标系统包含以下基本概念:
三维向量(Vector3):
用于表示三维坐标空间的向量和点,可进行向量运算。
世界坐标(World Space):
相对于整个世界空间建立坐标系,使用全局坐标(通过Transform.position获取)。其X轴正方向指向屏幕右侧,Y轴...
分类:
其他好文 时间:
2014-08-13 13:09:06
阅读次数:
374
It is not as easy as I thought it to be, mostly because of time\space limitation. And actually that's the punch line of this problemMy intuition was D...
分类:
其他好文 时间:
2014-08-13 08:00:25
阅读次数:
250
1、查看segment advisor
方法一:
select * fromtable(dbms_space.asa_recommendations('TRUE','FALSE','FALSE'));
dbms_space.asa_recommentdations的三个参数:
all_runs TURE返回历次运行的结果,FALSE则返回最近一次运行的结果
show_ma...
分类:
其他好文 时间:
2014-08-12 17:07:44
阅读次数:
471
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-08-12 16:40:14
阅读次数:
157
Android生成heap dump文件(.hprof)一个heap dump就是一个程序heap的快照,可以获知程序的哪些部分正在使用大部分的内存。它保存为一种叫做HPROF的二进制格式。对于Android执行android.os.Debug.dumpHprofData(hprofPath)方法后所生成的文件,需要把.hprof文件从Dalvik格式转换成J2SE HPROF格式。使用Andro...
分类:
移动开发 时间:
2014-08-12 13:43:04
阅读次数:
262
使用MAT比较多个heap dump文件 调试内存泄露时,有时候适时比较2个或多个heap dump文件是很有用的。这时需要生成多个单独的HPROF文件。下面是一些关于如何在MAT里比较多个heap dumps的内容(有一点复杂):1. 第一个HPROF 文件(usingFile > Open Heap Dump ).2. 打开Histogram view.图1. Histogra...
分类:
其他好文 时间:
2014-08-12 13:39:24
阅读次数:
183