JIngles123
码龄5年
  • 230,383
    被访问
  • 666
    原创
  • 3,311
    排名
  • 34
    粉丝
关注
提问 私信

个人简介:生命不息,奋斗不止

  • 加入CSDN时间: 2017-10-01
博客简介:

qq_40467670的博客

查看详细资料
  • 7
    领奖
    总分 3,058 当月 160
个人成就
  • 获得119次点赞
  • 内容获得82次评论
  • 获得224次收藏
创作历程
  • 170篇
    2022年
  • 421篇
    2021年
  • 68篇
    2020年
  • 8篇
    2018年
成就勋章
TA的专栏
  • 我爱科研,我爱论文
    1篇
  • AcWing练习(C++)
  • AcWing竞赛题练习
    5篇
  • 剑指offer
    61篇
  • 算法基础课-1、基础算法
    11篇
  • 算法基础课-2、数据结构
    2篇
  • 算法基础课-3、搜索与图论
    5篇
  • 算法基础课-4、数学知识
  • 算法基础课-5、动态规划
  • 算法基础课-6、贪心
  • 力扣练习(C++)
  • 每日一题
    5篇
  • 简单题
    175篇
  • 中等题
    148篇
  • 困难题
    13篇
  • 网络
    1篇
  • 软件使用
    27篇
  • 杭电oj练习(C/Java)
    48篇
  • C#项目遇到的obstacle和tip
    35篇
  • 力扣练习(Java)
    90篇
  • 数据库
    6篇
  • C++
    7篇
  • 前端
    2篇
  • 以太坊
    8篇
  • Linux
    13篇
  • Java
    8篇
兴趣领域 设置
  • 编程语言
    c++
  • 后端
    后端
  • 职场和发展
    leetcode
  • 最近
  • 文章
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

力扣-752题 打开转盘锁(C++)- bfs状态转换

题目链接:https://leetcode.cn/problems/open-the-lock/题目如下:class Solution {public: int openLock(vector<string>& deadends, string target) { //状态的bfs string start="0000"; if(start==target) return 0; return bfs(de
原创
发布博客 2022.05.20 ·
9 阅读 ·
0 点赞 ·
0 评论

力扣-面试题04.01题 节点间通路(C++)- BFS

题目链接:https://leetcode.cn/problems/route-between-nodes-lcci/题目如下:class Solution {public: bool findWhetherExistsPath(int n, vector<vector<int>>& graph, int start, int target) { //存储图的各条边 unordered_map<int,vector<
原创
发布博客 2022.05.19 ·
77 阅读 ·
0 点赞 ·
0 评论

力扣-1306题 跳跃游戏 III(C++)- dfs

题目链接:https://leetcode.cn/problems/jump-game-iii/题目如下:class Solution {public: bool canReach(vector<int>& arr, int start) { //回溯和dfs的区别:回溯有回退,dfs无回退 int n=arr.size(); if(n==0) return res; vector<bool>
原创
发布博客 2022.05.18 ·
115 阅读 ·
0 点赞 ·
0 评论

力扣-1306题 跳跃游戏 III(C++)- dfs

题目链接:https://leetcode.cn/problems/jump-game-iii/题目如下:class Solution {public: bool canReach(vector<int>& arr, int start) { //回溯和dfs的区别:回溯有回退,dfs无回退 int n=arr.size(); if(n==0) return res; vector<bool>
原创
发布博客 2022.05.18 ·
115 阅读 ·
0 点赞 ·
0 评论

力扣-207题 课程表(C++)- 拓扑排序

题目链接:https://leetcode.cn/problems/course-schedule/题目如下:class Solution {public: bool canFinish(int numCourses, vector<vector<int>>& prerequisites) { //拓扑排序只需要记录所有点的入度,以及每条边即可,每次判断入度是否为0 vector<int> in;//存储所有节点的
原创
发布博客 2022.05.17 ·
71 阅读 ·
0 点赞 ·
0 评论

拓扑排序 - AcWing 848. 有向图的拓扑序列(C++)- 简单

题目链接:https://www.acwing.com/problem/content/description/850/题目如下:#include <iostream>#include <algorithm>#include <cstring>//memset#include <queue>using namespace std;const int N=100010;int n,m;vector<int> g[N];//存
原创
发布博客 2022.05.17 ·
46 阅读 ·
0 点赞 ·
0 评论

力扣-面试题16.19题 水域大小(C++)- BFS

题目链接:https://leetcode.cn/problems/pond-sizes-lcci/题目如下:class Solution {public: vector<int> pondSizes(vector<vector<int>>& land) { l=land; int m=land.size(); if(m==0) return res; int n=land[0].si
原创
发布博客 2022.05.16 ·
60 阅读 ·
0 点赞 ·
0 评论

力扣-200题 岛屿数量(C++)- BFS

题目链接:https://leetcode.cn/problems/number-of-islands/题目如下:class Solution {public: int numIslands(vector<vector<char>>& grid) { //flood-fill算法,要遍历每一个格子,然后分别bfs or dfs int res=0; int m=grid.size(); if(m
原创
发布博客 2022.05.16 ·
48 阅读 ·
0 点赞 ·
0 评论

BFS - AcWing 845. 八数码(C++)- 中等

题目链接:https://www.acwing.com/problem/content/description/847/题目如下:#include <iostream>#include <algorithm>#include <queue>#include <unordered_map>using namespace std;int bfs(string start){ string end="12345678x";
原创
发布博客 2022.05.14 ·
51 阅读 ·
0 点赞 ·
0 评论

BFS - AcWing 844. 走迷宫(C++)- 简单

题目链接:https://www.acwing.com/problem/content/description/846/题目如下:#include <iostream>#include <queue>#include <vector>#include <cstring>using namespace std;const int N=1000;typedef pair<int,int> PII;int n,m;int a[N
原创
发布博客 2022.05.13 ·
91 阅读 ·
1 点赞 ·
0 评论

resize()和reserve()比较,及使用resize初始化一维vector和二维vector

首先,我们要明确在这里比较一下两个常见又相似,容易让人混淆的两个函数,一个是resize()函数,另一个是reserve()函数。比较:resize():改变vector中元素的数目,使用这个函数之后,就已经分配它的内存大小。reserve():设置这个vector的容量大小,和resize()的区别在于,使用这个函数之后,此时还并没有真正分配内存。用法区别:resize():有两种用法,第一种,只传一个参数,即给定容器大小,此时默认初始值为0;第二种,传递两个参数,第一个是容器大小,第二个是初始
原创
发布博客 2022.05.13 ·
79 阅读 ·
1 点赞 ·
0 评论

力扣-124题 二叉树中的最大路径和(C++)- dfs

题目链接:https://leetcode.cn/problems/binary-tree-maximum-path-sum/题目如下:/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr)
原创
发布博客 2022.05.13 ·
81 阅读 ·
1 点赞 ·
0 评论

论文中的参考文献,拉到word中显示乱码,解决办法

今天要交开题报告了,由于自己没有关电脑的习惯,所以一直也没发现这个问题,我拉过来的文献格式都可以,大小也都调整好了,终于的终于,关闭窗口,准备提交系统。但就在这时候,我再重新打开,看看有无错误时,意外发现我的引用文献都变成了乱码,如下图所示,满满21篇引用文献,如果让我重新找,我都不一定能找的回来,瞬时奔了,吃午饭去。午饭回,再次打开这糟心的开题报告,看着这堆乱码,感叹万分,起初想是不是编码的问题,但是想了下,其他文字描述都能正确表示,只有引用的文献出了问题,那么问题都在这一部分,当我选中一些糟心的
原创
发布博客 2022.05.12 ·
259 阅读 ·
0 点赞 ·
0 评论

力扣-543题 二叉树的直径(C++)- dfs

题目链接:https://leetcode-cn.com/problems/diameter-of-binary-tree/题目如下:/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {}
原创
发布博客 2022.05.09 ·
148 阅读 ·
1 点赞 ·
0 评论

力扣-442题 数组中重复的数据(C++)- hash

题目链接:https://leetcode-cn.com/problems/find-all-duplicates-in-an-array/题目如下:class Solution {public: vector<int> findDuplicates(vector<int>& nums) { vector<int> res; unordered_map<int,int> umap; fo
原创
发布博客 2022.05.08 ·
226 阅读 ·
0 点赞 ·
0 评论

AcWing 83. 股票的最大利润(C++)- 贪心、线性扫描

题目链接:https://www.acwing.com/problem/content/79/题目如下:class Solution {public: int maxDiff(vector<int>& nums) { if(nums.size()==0) return 0; //前i-1天的最小收益=当前卖出价格-最小买入价格 int res=0; int minVal=nums[0];
原创
发布博客 2022.05.07 ·
332 阅读 ·
0 点赞 ·
0 评论

AcWing 86. 构建乘积数组(C++)- 前后缀分解

题目链接:https://www.acwing.com/problem/content/description/82/题目如下:class Solution {public: vector<int> multiply(const vector<int>& A) { //思路:答案数组的每个元素,先乘上所有位置的前缀乘积后,再乘上所有位置的后缀乘积 if(A.size()==0) return vector<int>(
原创
发布博客 2022.05.07 ·
312 阅读 ·
1 点赞 ·
0 评论

力扣-2190题 数组中紧跟key之后出现最频繁的数字(C++)- 哈希

题目链接:https://leetcode-cn.com/problems/most-frequent-number-following-key-in-an-array/题目如下:class Solution {public: int mostFrequent(vector<int>& nums, int key) { map<int,int> umap; bool flag=false; for(int i
原创
发布博客 2022.05.03 ·
457 阅读 ·
0 点赞 ·
0 评论

单调队列 - AcWing 154. 滑动窗口(C++)- 简单

题目链接:https://www.acwing.com/problem/content/156/题目如下:#include <iostream>#include <deque>using namespace std;const int N=1000010;int n,k;int nums[N];deque<int> que;int main(){ cin>>n>>k; for(int i=0;i<n;
原创
发布博客 2022.05.03 ·
704 阅读 ·
1 点赞 ·
0 评论

AcWing 79. 滑动窗口的最大值(C++)- 单调队列、超详细注释

题目链接:https://www.acwing.com/problem/content/description/75/题目如下:class Solution {public: vector<int> maxInWindows(vector<int>& nums, int k) { vector<int> res; deque<int> que;//双端队列由vector实现,滑动窗口队列中存放的是数组下标
原创
发布博客 2022.05.03 ·
558 阅读 ·
0 点赞 ·
0 评论
加载更多