Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word ...
分类:
其他好文 时间:
2014-11-29 08:23:27
阅读次数:
153
Given two sorted integer arrays A and B, merge B into A as one sorted array. Note:You may assume that A has enough space (size that is greater or equa...
分类:
其他好文 时间:
2014-11-29 07:00:12
阅读次数:
193
题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1113根据样例分析:1、沙漠只有500公里或者更短,这时很简单,一次搞定。2、沙漠600km,怎么办?我们需要保证的是:车到了离沙漠终点还有500km的地方,能恰恰加满油而且不会有任何多余,方案其实...
分类:
其他好文 时间:
2014-11-28 20:01:13
阅读次数:
211
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Follow up:
Can you solve it without using extra space?
#include
#include
typedef struct ListNode...
分类:
其他好文 时间:
2014-11-28 18:22:51
阅读次数:
172
select * from dual;create tablespace test_sapce datafile 'E:\YC59\space\AAAA' size 10M;alter tablespace test_sapce add datafile 'E:\YC59\space\AAAA_1'...
分类:
数据库 时间:
2014-11-28 17:40:07
阅读次数:
404
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. Y...
分类:
其他好文 时间:
2014-11-28 16:26:03
阅读次数:
129
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
#include
#include
typedef struct ListNode {
int val;
struct ListNode *nex...
分类:
其他好文 时间:
2014-11-28 16:21:41
阅读次数:
179
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Follow up:Can you solve it without using extra space?A...
分类:
其他好文 时间:
2014-11-28 07:39:59
阅读次数:
201
题目链接Space AntTime Limit:1000MSMemory Limit:10000KTotal Submissions:3219Accepted:2059DescriptionThe most exciting space discovery occurred at the end o...
分类:
编程语言 时间:
2014-11-27 22:04:00
阅读次数:
322
一、字典序法
1) 从序列P的右端开始向左扫描,直至找到第一个比其右边数字小的数字,即。
2) 从右边找出所有比大的数中最小的数字,即&space;a_{i},&space;j>&space;i&space;\right&space;\}" title="a_{k}=min\left \{ a_{j}|a_{j}> a_{i}, j> i \right \}" alt="">。
3) 交换与...
分类:
编程语言 时间:
2014-11-27 16:18:13
阅读次数:
257