- 博客(3)
- 收藏
- 关注
原创 leetcode two nums c++实现
先直接粘贴原题: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use
2017-09-12 20:06:18 295
原创 子序列
题目: 给定一个长度为N的数组,找出一个最长的单调自增子序列(不一定连续,但是顺序不能乱)例如:给定一个长度为8的数组A(1,3,5,2,4,6,7,8),则其最长的单调递增字序列为{1,2,4,6,7,8},长度为6. 分析:用动态规划的思想解决。 1.若元素只有一个A[0]必为其最长子序列。 2.如果是两个,则A[0]之后,如果A[1]>A[0]则A[0],A[1]是最长子序列,
2017-09-08 15:49:04 244
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人