- 博客(3)
- 收藏
- 关注
原创 c++算法学习之数组(leetcode)
时间复杂度n,空间复杂度nclass Solution {public: void moveZeroes(vector<int>& nums) { vector<int> nonzero; for(int i=0;i<nums.size();i++) if(nums[i]) nonzero.push_back(nums[i]); for(int i=0;i<...
2020-07-12 18:13:54
192
原创 c++算法学习(leetcode刷题)网址收藏
网址收藏:https://gitee.com/lsgwrhttps://github.com/liuyubobobo/https://github.com/changgyhub/leetcode_101https://github.com/CyC2018/CS-Noteshttps://github.com/changgyhub/notes/blob/master/basics/algorithms-and-data-structures.md#%E8%B4%AA%E5%BF%83h
2020-07-12 11:58:42
591
原创 时间复杂度与空间复杂度
文章为个人学习笔记,参考课程:https://u.geekbang.org/subject/algorithm/1000343时间复杂度(与运行次数有关,n表示数据规模)O(1):常数复杂度O(log n):对数复杂度O(n):线性时间复杂度O(n^2):平方O(n^3):立方O(2^n):指数O(n!):阶乘注意:只看最高复杂度的运算,忽略系数。例子参考:https://www.zhihu.com/question/21387264空间复杂度数组长.
2020-07-12 10:09:17
118
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人