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 at most k transactions.
Note:
You may no...
分类:
其他好文 时间:
2015-06-16 16:51:37
阅读次数:
107
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 at most two transactions.
Note:
You ma...
分类:
其他好文 时间:
2015-06-16 11:05:45
阅读次数:
116
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai)
and (i, 0). Fin...
分类:
其他好文 时间:
2015-06-16 09:23:26
阅读次数:
138
13.1. csv — CSV File Reading and Writing ?????? The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. ?There is no “...
分类:
编程语言 时间:
2015-06-15 22:22:19
阅读次数:
231
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array nums = [1,1,1,2,2,3],
Your function should return length = 5, with the first five e...
分类:
其他好文 时间:
2015-06-15 22:16:46
阅读次数:
103
Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] is at most t and the difference between i and j is...
分类:
其他好文 时间:
2015-06-15 14:37:25
阅读次数:
81
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock),...
分类:
其他好文 时间:
2015-06-15 11:14:06
阅读次数:
110
链接](https://github.com/languages??/Objective-C/most_watched)* [three20](https://github.com/facebook/three20)* faebook的320库*** [AFNetworking](https://g...
分类:
移动开发 时间:
2015-06-15 10:59:22
阅读次数:
110
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two ...
分类:
其他好文 时间:
2015-06-15 09:36:47
阅读次数:
78
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:
其他好文 时间:
2015-06-14 18:22:19
阅读次数:
105