You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you cli...
分类:
其他好文 时间:
2014-08-24 22:00:03
阅读次数:
220
Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not c...
分类:
其他好文 时间:
2014-08-23 15:11:00
阅读次数:
153
参考并转载 http://www.cnblogs.com/bhtfg538/archive/2008/11/25/1341016.htmlFirst:(8)SELECT(9)DISTINCT(11)(1)FROM(3)JOIN(2)ON(4)WHERE(5)GROUPBY(6)WITH{CUBE|R...
分类:
数据库 时间:
2014-08-23 09:57:20
阅读次数:
193
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2-...
分类:
其他好文 时间:
2014-08-22 22:22:09
阅读次数:
233
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2014-08-22 21:06:19
阅读次数:
203
题目:uva10069 - Distinct Subsequences(大数+DP)
题目大意:给出字符串A , B。问能够在A中找到多少子串B,可以不连续。
解题思路:dp【i】【j】 代表从i位开始的B串在从j位开始的A串中能够找到多少种。
B【i】 == A【j】 dp【i】【j】 = dp【i - 1】【j - 1】 + dp【i】【...
分类:
其他好文 时间:
2014-08-22 12:55:38
阅读次数:
200
1、查询语句 (1)select 列名, 列名, ... from 表名 例:setect * from 表名 获取表格中所有内容 (2)select distinct 列名, 列名, ... from 表名 //获取某列唯一不同的值 (3)select 列名...
分类:
数据库 时间:
2014-08-21 22:35:54
阅读次数:
320
Oracle数据库中Select语句语法及介绍SELECT [ ALL | DISTINCT ] ,[,…][WHERE ][GROUP BY [HAVING]][ORDER BY [ASC | DESC]]语句说明:[]方括号为可选项[GROUP BY [HAVING]]指将结果按的值进行分组.....
分类:
数据库 时间:
2014-08-21 16:45:54
阅读次数:
292
A classic and representative DP problem. To be revised later. Quite a few interesting details to think about.class Solution {public: int numDistinc...
分类:
其他好文 时间:
2014-08-21 13:03:34
阅读次数:
180
Problem 29
Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:
22=4, 23=8, 24=16, 25=32
32=9, 33=27, 34=81, 35=243
42=16, 43=64, 44=256, 45=1024
52=25, 53=125, 54=625, 55=312...
分类:
其他好文 时间:
2014-08-21 08:26:53
阅读次数:
177