准备工作: SQL> conn sys/root as sysdba
Connected. SQL> grant select on v_$sql_plan to scott; Grant succeeded.
SQL> grant select on v_$session to scott; Gr...
分类:
数据库 时间:
2014-05-16 04:56:06
阅读次数:
431
Two SumGiven an array of integers, find two
numbers such that they add up to a specific target number.The function twoSum
should return indices of the...
分类:
其他好文 时间:
2014-05-15 10:48:59
阅读次数:
322
LeetCode-001 Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2...
分类:
其他好文 时间:
2014-05-15 04:34:50
阅读次数:
293
http://acm.hdu.edu.cn/showproblem.php?pid=4635
Strongly connected
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1381 Accepted Sub...
分类:
其他好文 时间:
2014-05-15 03:26:53
阅读次数:
248
题意:给定一组数和另一个数,在这组数中找两个数,使它们的和等于给定的数
思路1: --> 错,因为题目要求返回下标。
1.排序
2.两个下标,一个指向头,一个指向尾
3.如果下标指向的两个元素相加大于给定的数,尾下标减一
如果小于,头下标加一
思路2: hash
1.用hash存储每个数的下标
2.数组,看hash[target-num[i]]是否存在
复杂度:时间O(n), 空间O(n)...
分类:
其他好文 时间:
2014-05-15 01:28:13
阅读次数:
297
[ 问题: ]
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the ta...
分类:
其他好文 时间:
2014-05-15 00:04:39
阅读次数:
377
有用+1编辑有向图强连通分量在有向图G中,如果两个顶点vi,vj间(vi>vj)有一条从vi到vj的有向路径,同时还有一条从vj到vi的有向路径,则称两个顶点强连通(strongly
connected)。如果有向图G的每两个顶点都强连通,称G是一个强连通图。有向图的极大强连通子图,称为强连通分量(...
分类:
其他好文 时间:
2014-05-14 22:40:02
阅读次数:
474
强连通分量有向图中, u可达v不一定意味着v可达u. 相互可达则属于同一个强连通分量(Strongly
Connected Component, SCC)有向图和它的转置的强连通分量相同所有SCC构成一个DAG 1、强连通图。...
分类:
其他好文 时间:
2014-05-14 22:34:47
阅读次数:
585
实际上也是一个二分查找的问题。
要找出范围,决定了当找到这个数时不能马上返回,如果找target最前面的那个位置,只有当这个位置等于target,且这个位置的前一个位置不等于target时,才能返回这个位置。如果找的是target最后面的那个位置,那么只有当这个位置等于target,且这个位置的后一个位置不等于target时,才会返回它。不满足返回条件时,下一次递归走什么位置也不一样,找前面的时...
分类:
其他好文 时间:
2014-05-14 21:58:25
阅读次数:
350
BBS:bbs.51osos.com zzsi_ljz注册信箱是:pyfx2008@qq.comBLOG:zzljz.lofter.comcysky.blog.51cto.com 技术网站:www.51cto.com cyskywww.oschina.compyfx2008@qq.comhttps://git.oschina.net/ pyfx2008@qq.com我的个性:http://git.oschina/net/zz..
分类:
Web程序 时间:
2014-05-14 17:21:22
阅读次数:
283