
贪心算法
weixin_42741175
这个作者很懒,什么都没留下…
展开
-
leetcode 455. 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 of a coo...原创 2019-05-11 17:19:32 · 144 阅读 · 0 评论 -
leetcode 122. 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 (i.e., buy one...原创 2019-05-07 23:23:14 · 113 阅读 · 0 评论 -
leetcode 55. 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. Determine if you ...原创 2019-05-06 23:27:08 · 89 阅读 · 0 评论