
算法,leetcode,动态规划,C++
文章平均质量分 86
Zarlove
这个作者很懒,什么都没留下…
展开
-
Leetcode算法学习日志-121 Best Time to Buy and Sell Stock
Leetcode 121 Best Time to Buy and Sell Stock题目原文Say you have an array for which the ith element is the price of a given stock on dayi.If you were only permitted to complete at most one trans原创 2017-08-13 10:47:38 · 414 阅读 · 0 评论 -
Leetcode算法学习日志-70 Climbing Stairs
Leetcode 70 Climbing Stairs题目原文You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the t原创 2017-08-13 16:16:49 · 449 阅读 · 0 评论 -
Leetcode算法学习日志-673 Number of Longest Increasing Subsequence
Leetcode 673 Number of Longest Increasing Subsequence题目原文Given an unsorted array of integers, find the number of longest increasing subsequence.Example 1:Input: [1,3,5,4,7]Output: 2Expla原创 2017-09-13 15:56:27 · 1732 阅读 · 0 评论 -
LeetCode算法学习日志-638 Shopping Offers
LeetCode 638 Shopping Offers题目原文In LeetCode Store, there are some kinds of items to sell. Each item has a price.However, there are some special offers, and a special offer consists of one or m原创 2017-09-03 20:09:12 · 1784 阅读 · 2 评论 -
Leetcode算法学习日志-338 Counting Bits
LeetCode 338 Counting Bits题目原文Given a non negative integer number num. For every numbersi in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as原创 2017-09-02 22:04:27 · 155 阅读 · 0 评论 -
Leetcode算法学习日志-576 Out of Boundary Paths
Leetcode 576 Out of Boundary Paths题目原文There is an m by n grid with a ball. Given the start coordinate(i,j) of the ball, you can move the ball to adjacent cell or cross the grid boundary in fou原创 2017-09-12 19:36:21 · 604 阅读 · 0 评论 -
Leetcode算法学习日志-152 Maximum Product Subarray
Leetcode 152 Maxinum Product Subarray题目原文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],t原创 2017-10-28 15:12:51 · 305 阅读 · 0 评论 -
Leetcode算法学习日志-309 Best Time to Buy and Sell Stock with Cooldown
Leetcode 309 Best Time to Buy and Sell Stock with Cooldown题目原文Say you have an array for which the ith element is the price of a given stock on dayi.Design an algorithm to find the maximum pr原创 2017-11-22 20:38:57 · 354 阅读 · 0 评论 -
Leetcode算法学习日志-718 Maximum Length of Repeated Subarray
Leetcode 718 Maximum Length of Repeated Subarray题目原文Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays.Example 1:Input:A: [1,2,3,2,1]原创 2017-12-19 12:32:27 · 358 阅读 · 0 评论