c++
zuochenbigdata
这个作者很懒,什么都没留下…
展开
-
leetcode 1. Two Sum 解法讨论
题目内容如下: 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. Example: Given nums原创 2016-11-28 23:23:52 · 215 阅读 · 0 评论 -
leetcode 119. Pascal's Triangle II 解法讨论
这个题关键是注意第二个循环,必须倒序的修改杨辉三角的值,不能顺序的改。C++解法时间复杂度O(n^2),空间复杂度O(k) 耗时0msclass Solution {public: vector<int> getRow(int rowIndex) { vector<int> array; for (int i = 0; i <= rowIndex; i++)原创 2016-12-01 00:24:52 · 305 阅读 · 0 评论 -
c++标准库关联容器----(map、set等)的应用总结
c++标准库关联容器的总结原创 2016-11-27 22:37:42 · 251 阅读 · 0 评论