摘要: ###读入一行 char ch[100];cin.getline(ch,100);string str;getline(cin,str); ###优先队列 priority_queue<int,vector<int>,greater<int>> que;//升序,小顶堆 struct ListNod 阅读全文
posted @ 2022-01-30 14:53 剩下的交给时间就好 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 字符串转int (5条消息) c++中的atoi()和stoi()函数的用法和区别_鸡啄米的时光机的博客-CSDN博客_stoi int转字符串 s=to_string(root->val); 递归三部曲,1确定递归函数参数和返回值;2确定终止条件;3确定单层逻辑 三种基本遍历,不仅递归要会,用栈迭 阅读全文
posted @ 2022-01-21 16:32 剩下的交给时间就好 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 栈的基本操作 empty() 堆栈为空则返回真 pop() 移除栈顶元素 (删除) push() 在栈顶增加元素 (增加) size() 返回栈中元素数目 top() 返回栈顶元素,不删除(获取) 队列的基本操作 back()返回最后一个元素 empty()如果队列空则返回真 front()返回第一 阅读全文
posted @ 2022-01-17 11:52 剩下的交给时间就好 阅读(28) 评论(0) 推荐(0) 编辑
摘要: int转char a = 1;char b = char(a+'0'); 字符串转char* if(strstr(x,s[i].c_str())); 分割子串 s.substr(pos, len)!!! 判断是否是子串 char x[12],y[12]; cin>>x>>y; if(strstr(x 阅读全文
posted @ 2022-01-15 11:30 剩下的交给时间就好 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 哈希法,常用数据结构:数组,set,map(unordered_set,unordered_map) 1.用数组 242. 有效的字母异位词 - 力扣(LeetCode) (leetcode-cn.com) 1 class Solution { 2 public: 3 bool isAnagram( 阅读全文
posted @ 2022-01-14 11:31 剩下的交给时间就好 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 链表题,多指针(反转链表),多虚拟头(分隔链表) 160. 相交链表 - 力扣(LeetCode) (leetcode-cn.com) 用集合,先把A链表存进集合,然后遍历B链表,每次判断节点是否在集合里,在的话就是第一个相交,用集合来判断链表公共元素问题太方便了 1 class Solution 阅读全文
posted @ 2022-01-13 19:57 剩下的交给时间就好 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 阅读全文
posted @ 2022-01-05 15:09 剩下的交给时间就好 阅读(43) 评论(7) 推荐(0) 编辑
摘要: 待解决: exports和module.exports区别 exports对外暴露单个函数,module.exports对外暴露一个类(类里有很多函数) exports的使用 exports.[name1] = [name1] exports.[name2] = [name2] mudule.exp 阅读全文
posted @ 2021-12-29 09:29 剩下的交给时间就好 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 点击转到代码,删除波浪线这行代码即可 其实报错信息也说明了在 Form1.Designer.cs里的134行 阅读全文
posted @ 2021-12-27 19:42 剩下的交给时间就好 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 授权认证 (--auth) mongod --dbpath c:/D/mongodb -logpath c:/D/mongodb/mongodb.log --auth 关联查询且筛选关联字段 这是schema层定义,user表关联task表,mytasks:[ {type: mongoose.Sch 阅读全文
posted @ 2021-12-25 20:30 剩下的交给时间就好 阅读(43) 评论(0) 推荐(0) 编辑