Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy on...
分类:
其他好文 时间:
2014-12-09 17:55:38
阅读次数:
194
【题目】
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.
Y...
分类:
其他好文 时间:
2014-12-09 17:46:14
阅读次数:
133
It's obvious an DP problem.Let's define:$dp[i] := $ the maximum sum of subarray in the first $i$ elements.From the base point, the optimal subarray ma...
分类:
其他好文 时间:
2014-12-09 17:12:39
阅读次数:
141
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2014-12-09 13:44:16
阅读次数:
210
【题目】
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.
D...
分类:
其他好文 时间:
2014-12-09 10:37:18
阅读次数:
114
问题描述:
Given a string S, find the longest palindromic substring in
S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.
基本思想:
本题的navi...
分类:
其他好文 时间:
2014-12-08 23:04:00
阅读次数:
221
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-12-08 13:46:49
阅读次数:
138
Tracert命令简介
Tracert命令使用IP生存时间(TTL)字段和ICMP错误消息来确定从一个主机到网络上其他主机的路由。
命令格式:
tracert [-d] [-h maximum_hops] [-j computer-list] [-w timeout] target_name
-d 指定不将地址解析为计算机名.
-h maximum_hops 指定搜索目标的最大跃...
分类:
其他好文 时间:
2014-12-07 10:11:39
阅读次数:
965
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:
其他好文 时间:
2014-12-06 15:19:13
阅读次数:
199
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...
分类:
其他好文 时间:
2014-12-05 21:07:13
阅读次数:
167