【题目描述】给定一个字符串,计算其不同的子串个数。【输入格式】一行一个仅包含大写字母的字符串,长度=n或者所有后缀的排名都不同。 然后正常情况下k增加logN次,每次如果用计数排序只要O(N),一共O(NlogN)。 但是不会写计数排序啊QAQ。。所以用快排好了。。多加一个log,一般不会被卡的.....
分类:
其他好文 时间:
2015-03-30 22:58:49
阅读次数:
277
N-Queens IIFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions. 1 class Solutio...
分类:
其他好文 时间:
2015-03-30 16:17:44
阅读次数:
141
The SAP EDI process comprises two distinct processes.Outbound processInbound processThe Outbound ProcessThe outbound process sends documents from the ...
分类:
其他好文 时间:
2015-03-30 10:57:30
阅读次数:
268
https://leetcode.com/problems/distinct-subsequences/Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a ...
分类:
其他好文 时间:
2015-03-29 17:45:56
阅读次数:
146
Distinct Subsequences问题:Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which...
分类:
其他好文 时间:
2015-03-28 21:45:13
阅读次数:
167
SELECT语句的执行的逻辑查询处理步骤:(8)SELECT (9)DISTINCT(11) (1)FROM (3) JOIN (2) ON (4)WHERE (5)GROUP BY (6)WITH {CUBE | ROLLUP}(7)HAVING (10)ORDER BY 1.FROM2.ON.....
分类:
数据库 时间:
2015-03-28 15:41:07
阅读次数:
196
题目链接:subsets
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
*
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a su...
分类:
其他好文 时间:
2015-03-28 08:50:46
阅读次数:
100
添加、删除、修改使用db.Execute(Sql)命令执行操作╔----------------╗☆ 数据记录筛选 ☆╚----------------╝注意:单双引号的用法可能有误(没有测试)Sql = "Select Distinct 字段名 From 数据表"Distinct函数,查询数据库存...
分类:
数据库 时间:
2015-03-27 22:13:05
阅读次数:
190
top关键字:写在select后面字段的前面比如你要显示查询的前5条记录,如下所示:selecttop5*fromStudent一般情况下,top是和orderby连用的orderby用在表名的后面orderby后面就填你要按它排序的字段,是升序排序(从小到大排序)percent:百分比%=perc...
分类:
数据库 时间:
2015-03-21 12:33:23
阅读次数:
155
At first beginning, I was trying to use hash set to record the characters. But I found that was wrong.Because if there are couple same chars, when you...
分类:
其他好文 时间:
2015-03-20 08:06:07
阅读次数:
164