A peak element is an element that is greater than its neighbors.
Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.
The array may contain multiple peaks,...
分类:
其他好文 时间:
2015-04-05 17:31:44
阅读次数:
108
题目:
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. 思路分析:
和《Leetcode: Linked List Cycle 》一样还是双指针的方法。一个循环链表如图
slow指针走了S=X+Y
fast指针走了F=X+Y+Z+Y
两个指针相遇。...
分类:
其他好文 时间:
2015-04-05 13:25:38
阅读次数:
216
基础:增:insert into emp(empno, ename, job, mgr, hiredate, sal) values(9999, 'zhangsan', 'MANAGER', NULL, NULL, 200)删:delete from emp where comm is null;改...
分类:
数据库 时间:
2015-04-05 13:14:35
阅读次数:
196
$HTTP_RAW_POST_DATAThe RAW / uninterpreted HTTP POst information can be accessed with:$GLOBALS['HTTP_RAW_POST_DATA']This is useful in cases where the ...
分类:
Web程序 时间:
2015-04-05 09:00:24
阅读次数:
114
索引概述:用户对数据库最频繁的操作是进行数据查询。一般情况下,数据库在进行查询操作时需要对整个表进行数据搜索。当表中的数据很多时,搜索数据就需要很长的时间,这就造成了服务器的资源浪费。为了提高检索数据的能力,数据库引入了索引机制。数据库索引好比是一本书前面..
分类:
数据库 时间:
2015-04-05 06:48:34
阅读次数:
177
刚刚写一段代码
报这样的错误:
No enclosing instance of type Bag is accessible. Must qualify the allocation with an enclosing instance of type Bag (e.g. x.new A() where x is an instance of Bag).
代码预览:
{CSDN:...
分类:
编程语言 时间:
2015-04-04 18:31:57
阅读次数:
157
Description
Let’s consider equation:x2?+?s(x)·x?-?n?=?0,?
where x,?n are positive integers, s(x) is the function, equal to the sum of digits of number x in the decimal number system.You are given an...
分类:
其他好文 时间:
2015-04-04 16:49:33
阅读次数:
201
select count(*) from v$process --当前的连接数select value from v$parameter where name = 'processes' --数据库允许的最大连接数修改最大连接数:alter system set processes = 300 scope = spfile;重启数据库:shutdown immediate;startup;--查看...
分类:
移动开发 时间:
2015-04-04 16:47:19
阅读次数:
119
一、对分组的记录取前N条记录:例子:取前2条最大(小)的记录 1 1.用子查询: 2 SELECT * FROM right2 a WHERE 2> 3 (SELECT COUNT(*) FROM right2 b WHERE b.id=a.id AND b.account>a.account) ....
分类:
数据库 时间:
2015-04-04 16:28:04
阅读次数:
208
1.系统设置路径替换update dede_sysconfig set value='http://afish.cnblogs.com' where varname='cfg_basehost';update dede_sysconfig set value='/afish' where varna...
分类:
数据库 时间:
2015-04-04 16:27:36
阅读次数:
156