题目描述:Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space? 这题思路就是把单链表的前半部分或后半部分反转,然后比较。s....
分类:
其他好文 时间:
2015-07-25 19:40:11
阅读次数:
106
Sub-string divisibility
Problem 43
The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the digits 0 to 9 in some order, but it also has a rather interesting sub-str...
分类:
其他好文 时间:
2015-07-25 18:28:50
阅读次数:
164
// hdu3530 Subsequence 单调队列
// 题目大意:找到一个最大的子串,使得子串区间内最大值和最小值的差
// 在low和up范围内,串的规模10w。
// 解题思路:
// 单调队列,单调队列可以保留i位置之前的最大值和最小值的下标,有了这些
// 则,每次我们比较两个队列的队头,看差值是否大于up,(因为它是到i位置最大
// ...
分类:
其他好文 时间:
2015-07-25 16:53:45
阅读次数:
144
本文描写叙述怎样设置一个单一节点的Hadoop安装。以便您能够高速运行简单的操作,使用HadoopMapReduce和Hadoop分布式文件系统(HDFS)。參考官方文档:Hadoop MapReduce Next Generation - Setting up a Single Node Clus...
分类:
其他好文 时间:
2015-07-25 15:08:24
阅读次数:
195
#include
#include
#include
#include
using namespace std;
typedef pair P;
#define maxn 100000 + 10
deque Q1; //up
deque Q2; //down
int n, k;
long long a[maxn];
int main()
{
int T;
scanf...
分类:
其他好文 时间:
2015-07-25 12:18:15
阅读次数:
79
PushListView.h@interface PushListView : UIView oldContentOffsetY && oldContentOffsetY > contentOffsetY) { // 向上滚动 NSLog(@"up"); ...
分类:
其他好文 时间:
2015-07-25 11:54:03
阅读次数:
92
Pie
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 12486
Accepted: 4310
Special Judge
Description
My birthday is coming up and traditionally I'm servi...
分类:
其他好文 时间:
2015-07-25 10:48:15
阅读次数:
125
DescriptionA common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks...
分类:
其他好文 时间:
2015-07-25 01:38:05
阅读次数:
109
组合模型组合模型一般要比单个算法要好,下面简单的介绍下Bootstraping, Bagging, Boosting, AdaBoost, RandomForest 和Gradient boosting这些组合型算法.1.BootstrapingBootstraping: 名字来自成语“pull up by your own bootstraps”,意思就是依靠你自己的资源,称为自助法,它是一种有放...
分类:
编程语言 时间:
2015-07-24 22:39:31
阅读次数:
497
题目链接: Hdu 4612 Warm up题目描述: 给一个无向连通图,问加上一条边后,桥的数目最少会有几个?解题思路: 题目描述很清楚,题目也很裸,就是一眼看穿怎么做的,先求出来双连通分量,然后缩点重新建图,用bfs求树的直径,直径的长度就是减去桥的数目。这个题目需要手动扩展,而且手动扩展...
分类:
其他好文 时间:
2015-07-24 20:41:21
阅读次数:
92