原题地址:https://oj.leetcode.com/problems/distinct-subsequences/题意:Given
a stringSand a stringT, count the number of distinct subsequences ofTinS.A
subseq...
分类:
编程语言 时间:
2014-06-06 09:59:43
阅读次数:
330
【题目】
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 climb to the top?
【题意】
有个梯子有n阶,每次只能爬1阶或者2阶,为爬到梯子顶共有多少种爬法
【思路】
依次确定跳到每一阶上的爬法数目
这其实是一...
分类:
其他好文 时间:
2014-06-05 07:16:08
阅读次数:
203
You are climbing a stair case. It takesnsteps
to reach to the top.Each time you can either climb 1 or 2 steps. In how many
distinct ways can you climb...
分类:
其他好文 时间:
2014-06-04 19:53:34
阅读次数:
173
Subsets
Total Accepted: 13267 Total
Submissions: 48509My Submissions
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-desc...
分类:
其他好文 时间:
2014-06-02 10:28:35
阅读次数:
186
问题:
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...
分类:
其他好文 时间:
2014-06-01 18:08:28
阅读次数:
334
【题目】
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->1->1->2->3, return 2->3.
【题意】
给定一个有序链表,删出其中重复出现的值...
分类:
其他好文 时间:
2014-05-31 21:14:11
阅读次数:
333
DescriptionYou have an
arraya[1],?a[2],?...,?a[n], containing distinct integers from1ton. Your task is
to sort this array in increasing order with the...
分类:
其他好文 时间:
2014-05-31 01:35:23
阅读次数:
318
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-05-30 15:58:40
阅读次数:
187
DescriptionAn ascending sorted sequence of
distinct values is one in which some form of a less-than operator is used to
order the elements from smalle...
分类:
其他好文 时间:
2014-05-30 14:31:10
阅读次数:
297