![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
文章平均质量分 65
双人余田心
这个作者很懒,什么都没留下…
展开
-
map & hash_map
1.map用法 #include map a; a["a"] = "b"; 无类型限制,存储的数据结构为红黑树,因此查找效率为log(n)。 2.hash_map用法 #include hash_map a; 此时默认hash函数和equal_to函数为缺省。 注意:只有key为int等或者char等类型时原创 2017-09-21 20:02:30 · 192 阅读 · 0 评论 -
Longest increasing substring2 --DP
除了上文外,还可将LIS抽象为最长子序列。 1.此类问题通常可以转化为求最长子串问题(即保持原来的相对次序不变)。 例如最长对链: Input: [[1,2], [2,3], [3,4]] Output: 2 Explanation: The longest chain is [1,2] -> [3,4] 因为结果链子(s1,e1)->(s2原创 2017-09-21 20:12:45 · 209 阅读 · 0 评论