![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
文章平均质量分 78
wangjiangah
这个作者很懒,什么都没留下…
展开
-
跟着《算法导论》学习——动态规划法(Dynamic programming)
读前声明:本人所写帖子主要为了记录本人学习的一个过程,无他想法,由于内容比较肤浅,如有雷同,非常正常!!!本文内容:本文主要是参考《算法导论》这本书,完成部分算法编写,可能编程习惯或者风格比较差,还请多多批评。 和分治法一样,动态规划是通过组合子问题的解而解决整个问题的。与分治法不同的是,动态规划适用于子问题不是独立的情况,也就是各子问题包含公共的子子问题。在这种情况下,若用分治原创 2013-12-29 16:59:00 · 600 阅读 · 0 评论 -
LeetCode刷题之第一题——TwoSum
原题:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the ta原创 2015-01-18 22:03:26 · 414 阅读 · 0 评论 -
LeetCode刷题之第二题——Median of Two Sorted Arrays
原题:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).翻译:这里有A、B两个已排序数组,数组大小分别为原创 2015-02-07 13:41:22 · 364 阅读 · 0 评论