You are climbing a stair case. It takes n steps to reachto the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways canyou climb to the top?
HideTags
Dynamic Programming
...
分类:
其他好文 时间:
2015-02-02 23:15:59
阅读次数:
283
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.
Given an integer n, return all distinct solutions to the n-queens puzzle.
...
分类:
其他好文 时间:
2015-02-02 18:11:32
阅读次数:
128
select to_date(:fr_date,'yyyy-mm-dd') f_date,to_date(:to_date,'yyyy-mm-dd') t_date,nnd,count(distinct memb_id) memb_count,count(bill_id) bill_count,su...
分类:
数据库 时间:
2015-02-02 13:59:02
阅读次数:
129
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->3->3->4->4->5, return 1->2->5.
Given 1->...
分类:
其他好文 时间:
2015-02-01 16:10:35
阅读次数:
187
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to ou...
分类:
其他好文 时间:
2015-01-28 14:32:56
阅读次数:
152
删除表重复数据 (t1表中有重复数据)1、使用distinct create table t2 as select * from t1;create table tmp_t2 as select distinct * from t2;drop table t2;alter table tmp_t2 ...
分类:
数据库 时间:
2015-01-28 14:32:03
阅读次数:
131
使用distinct 函数获取DataFromCountry 字段不同的值select distinct DataFromCountry from PAP_Selloutselect distinct DataFromCountry from PAP_Inventory
分类:
其他好文 时间:
2015-01-28 12:31:42
阅读次数:
178
Total Accepted: 1167
Total Submissions: 3961
Given a string, find the length of the longest substring T that contains at most 2 distinct characters.
For example,Given s = “eceba”,
T is...
分类:
其他好文 时间:
2015-01-28 06:15:59
阅读次数:
149
http://www.w3cschool.cn/sql_having.html w3c中有些SQL的讲解1 order by 排序SELECT Company, OrderNumber FROM Orders ORDER BY Company;2 distinct 去重SELECT DISTINCT...
分类:
数据库 时间:
2015-01-27 18:16:12
阅读次数:
256
可以定义dp[i][j]表示第一个串的前i个字符中含有第二个串的前j个字符的总情况数;
则:如dp[i][j]=dp[i-1][j],如果str1[i]==str2[j]则dp[i][j]+=dp[i-1][j-1];
初始时讲所有的dp[i][0]赋值为1,其他为0。
然后这个题目需要用到大数,可以用C++重载运算符,或者是java的大数类;
我用的是java,第一次用java的大数,感...
分类:
其他好文 时间:
2015-01-27 16:20:39
阅读次数:
161