Sort a linked list in O(n log n)
time using constant space complexity.
#include
#include
typedef struct ListNode{
int val;
struct ListNode *next;
}ListNode;
ListNode *mergesort(ListNode *...
分类:
其他 时间:
2015-01-13 17:41:32
收藏:
0 评论:
0 赞:
0 阅读:
245
DISTINCT(COL)用来对结果去除重复
比如表内容如下:
SELECT DISTINCT(id)
FROM yww_test
下面的例子实现:选择过去一天,没有出现过的数据
-- 统计最原始的未上线采集数据,准备和其他表合并
DROP VIEW if EXISTS `unconnected_elemeterhead`;
CREATE VIEW unconnec...
分类:
数据库技术 时间:
2015-01-13 17:41:18
收藏:
0 评论:
0 赞:
0 阅读:
352
TIANKENG’s restaurant
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)
Total Submission(s): 931 Accepted Submission(s): 412
Problem Description
TIAN...
分类:
其他 时间:
2015-01-13 17:41:14
收藏:
0 评论:
0 赞:
0 阅读:
237
c++之cout、wcout、printf、wprintf不显示汉字或者遇到汉字即中断显示的原因...
分类:
编程语言 时间:
2015-01-13 17:40:04
收藏:
0 评论:
0 赞:
0 阅读:
439
TIANKENG’s rice shop
Problem Description
TIANKENG managers a pan fried rice shop. There are n kinds of fried rice numbered 1-n. TIANKENG will spend t time for once frying. Because the pan i...
分类:
其他 时间:
2015-01-13 17:39:54
收藏:
0 评论:
0 赞:
0 阅读:
338
原题链接:https://oj.leetcode.com/problems/median-of-two-sorted-arrays/
这是一道比较搞脑子的一道题,细节较多。
1. 这里用到的是findKth的思想,就是如果一共有奇数个元素,假设一共有t个元素,则中间元素为第t / 2 + 1个最大的,如果是偶数,则是t / 2位置和t / 2 + 1位置的平均数。
2. 关于find...
分类:
其他 时间:
2015-01-13 17:39:44
收藏:
0 评论:
0 赞:
0 阅读:
245
scala入门-09 scala高阶函数
scala入门-09 scala高阶函数
scala入门-09 scala高阶函数
scala入门-09 scala高阶函数...
分类:
其他 时间:
2015-01-13 17:39:34
收藏:
0 评论:
0 赞:
0 阅读:
263
偶然发现个 iOS NSNull object 比较问题...
分类:
移动平台 时间:
2015-01-13 17:39:24
收藏:
0 评论:
0 赞:
0 阅读:
314
题目意思:
http://acm.hdu.edu.cn/showproblem.php?pid=2053
给你n个灯,刚开始全灭,问经过无穷多次操作后,求第n个灯的状态。
题目分析:
见代码注释。
AC代码:
/**
*@xiaoran
*应该是数论问题,先模拟看看(过了),现在来看这道题
*题意:给你n个灯,刚开始全灭,问经过无穷多次操作后,第n个灯状...
分类:
其他 时间:
2015-01-13 17:39:14
收藏:
0 评论:
0 赞:
0 阅读:
244
1.创建ApplicationContext对象: ApplicationContext context = new FileSystemXmlApplicationContext("D:/workspace/test/resources/applicationContext-resource.x....
分类:
编程语言 时间:
2015-01-13 17:38:14
收藏:
0 评论:
0 赞:
0 阅读:
166
Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 ->...
分类:
其他 时间:
2015-01-13 17:38:04
收藏:
0 评论:
0 赞:
0 阅读:
287
public class ShellCommand{ public static void execCmd(String cmd, boolean wait) { execCmd(cmd, wait, null); } public static void execCmd(String cmd, ....
分类:
编程语言 时间:
2015-01-13 17:37:44
收藏:
0 评论:
0 赞:
0 阅读:
268
1、子页面访问父页面元素parent.document.getElementById('id')和document相关的方法都可以这样用2、父页面访问子页面元素document.getElementById('iframeId').contentDocument.getElementsByTagNa...
分类:
Web开发 时间:
2015-01-13 17:37:34
收藏:
0 评论:
0 赞:
0 阅读:
304
一、TOP替代Set RowCount在SQL Server 2005之前的传统SQL语句中,top语句是不支持局部变量的。见http://www.cnblogs.com/downmoon/archive/2007/12/29/1019686.html此时可以使用Set RowCount,但是在SQ...
分类:
数据库技术 时间:
2015-01-13 17:37:14
收藏:
0 评论:
0 赞:
0 阅读:
184
./configure,make,make install的作用这些都是典型的使用GNU的AUTOCONF和AUTOMAKE产生的程序的安装步骤。./configure是用来检测你的安装平台的目标特征的。比如它会检测你是不是有CC或GCC,并不是需要CC或GCC,它是个shell脚本。make是用来...
分类:
其他 时间:
2015-01-13 17:37:04
收藏:
0 评论:
0 赞:
0 阅读:
308
//+---------------------------------------------------//| 求两个时间的天数差 日期格式为 YYYY-MM-dd//+---------------------------------------------------function day...
分类:
其他 时间:
2015-01-13 17:36:54
收藏:
0 评论:
0 赞:
0 阅读:
198
支持BFC的浏览器(IE8+,firefox,chrome,safari)Block Formatting Context(块格式化上下文)是W3C CSS2.1规范中的一个慨念,在CSS3中被修改为flow root。格式化则表明了在这个环境中,元素处于此环境中应当被初始化,即元素在此环境中应当如...
分类:
其他 时间:
2015-01-13 17:36:44
收藏:
0 评论:
0 赞:
0 阅读:
283
1.极客学院 视频wangchunqiang8http://www.jikexueyuan.com/path/ios/2.基础http://www.cnblogs.com/mjios/archive/2013/04/24/3039357.html3.Swift开发http://www.25pp.co...
分类:
移动平台 时间:
2015-01-13 17:36:34
收藏:
0 评论:
0 赞:
0 阅读:
262
编辑您的代码:查看结果: 2015-1-13 00:00:00
分类:
Web开发 时间:
2015-01-13 17:36:24
收藏:
0 评论:
0 赞:
0 阅读:
435
原帖地址:http://blog.sina.com.cn/s/blog_4c451e0e010148nr.html项目编译成动态库是正常的,将 Android.mk 里面的include $(BUILD_SHARED_LIBRARY)改成include $(BUILD_STATIC_LIBRARY)...
分类:
其他 时间:
2015-01-13 17:36:14
收藏:
0 评论:
0 赞:
0 阅读:
331