- 博客(6)
- 收藏
- 关注
原创 Best Time to Buy and Sell Stock II
题目·: 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 (
2017-04-22 17:10:34 126
原创 Assign Cookies
题目: Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which is the minimum size
2017-04-22 15:24:37 147
原创 Clone Graph
题目: Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled uniquely. We use # as a separat
2017-04-10 13:56:11 127
原创 Evaluate Division
题目: Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the answers. If
2017-03-28 19:31:27 142
原创 Maximum Subarray
原题: 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,-
2017-03-17 21:32:21 143
原创 Majority Element
题目:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority eleme
2017-03-06 22:32:52 137
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人