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 (can be non...
分类:
编程语言 时间:
2015-03-13 10:57:15
阅读次数:
188
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguous subarray [4,?1,2,1] ha...
分类:
其他好文 时间:
2015-03-13 00:28:08
阅读次数:
187
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...
分类:
其他好文 时间:
2015-03-13 00:20:24
阅读次数:
178
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-03-13 00:14:25
阅读次数:
141
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguous subarray [4,?1,2,1] has the largest sum = 6....
分类:
其他好文 时间:
2015-03-12 22:42:13
阅读次数:
158
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
编程语言 时间:
2015-03-12 20:45:30
阅读次数:
144
1.题目Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [?2,1,?3,4,?1,2,1,?5,4],the contiguous subarray [4,?1,2,1] has...
分类:
其他好文 时间:
2015-03-12 11:38:49
阅读次数:
120
题目链接:Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
...
分类:
其他好文 时间:
2015-03-12 11:38:00
阅读次数:
123
题目链接:点击打开链接
题意:
给定n*m的矩阵,可以在矩阵中画出题目图片里黑色的线条。
任选一个点,左下右上的顺序走,走出图里的情况。使得走过的数字和最大,问最大的和。
思路:
点击打开链接
题解比较详细了
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.Pr...
分类:
其他好文 时间:
2015-03-11 23:27:17
阅读次数:
164
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ...
分类:
其他好文 时间:
2015-03-11 23:05:38
阅读次数:
170