废话: 有一段时间没搞过开发了,做项目又要重新找回点开发的记忆。重新拾回一点点零碎。 跑多了产线,配置的一些参数也忘记得差不多了,长时间没动就是易遗忘,找点资料做个笔记就是时间保镖。 正题: FND_REQUEST.SUBMIT_REQUEST 函数是用来提交一个请求的,它返回一个NUMBER值.具...
分类:
数据库 时间:
2014-07-07 17:06:54
阅读次数:
458
Problem Description:Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.Solution: 1 public int maxPoint.....
分类:
其他好文 时间:
2014-07-07 16:55:19
阅读次数:
281
Problem Description:Given an array of integers, every element appearsthreetimes except for one. Find that single one.Solution:1 Arrays.sort(A...
分类:
其他好文 时间:
2014-07-07 16:10:04
阅读次数:
174
题目
Given a string S and a string T, count the number of distinct subsequences of T in S.
A subsequence of a string is a new string which is formed from the original string by deleting some...
分类:
其他好文 时间:
2014-06-30 09:36:18
阅读次数:
192
题目
Follow up for N-Queens problem.
Now, instead outputting board configurations, return the total number of distinct solutions.
方法
和上题方法一样,使用回溯法,结构基本相同,只需要返回数量。
public i...
分类:
其他好文 时间:
2014-06-30 06:24:22
阅读次数:
273
题目
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
You have the following 3 operations permitte...
分类:
其他好文 时间:
2014-06-30 00:46:38
阅读次数:
262
题目
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows
like this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
A...
分类:
其他好文 时间:
2014-06-30 00:07:36
阅读次数:
268
【题目】
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
【题意】
给定一个整数以外,其中除了一个整数只出现一次以外...
分类:
其他好文 时间:
2014-06-29 22:52:35
阅读次数:
246
求区间的euler数值,自然使用筛子法了。
Problem Description
The Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are smaller than n and coprim...
分类:
其他好文 时间:
2014-06-29 22:49:30
阅读次数:
303
思路基本上就是组合计数,唯一特别需要注意的是在计算组合数的时候很容易越界,虽然上面分析了计算结果在int范围内是没有问题的,但是计算组合数中间过程还是很可能越界,所以这里要特别注意。解决方法是利用C(n,m)=C(n-1,m-1)+C(n-1,m)进行递归计算,而不是使用传统的乘法计算方式。为了更有效率一点,可以事先计算好n=1~32,m=1~32的组合数的结果然后存起来。...
分类:
其他好文 时间:
2014-06-29 22:30:04
阅读次数:
314