摘要: ![image](https://img2022.cnblogs.com/blog/2674359/202204/2674359-20220422225030033-1871223327.png) 阅读全文
posted @ 2022-04-22 22:51 wKingYu 阅读(32) 评论(0) 推荐(1)
摘要: 可以用 if ( a.find(x) == a.end() ) 判断 x 在 a 中是否存在 阅读全文
posted @ 2022-04-22 22:19 wKingYu 阅读(25) 评论(0) 推荐(0)
摘要: ![image](https://img2022.cnblogs.com/blog/2674359/202204/2674359-20220422220601594-1540187429.png) 阅读全文
posted @ 2022-04-22 22:06 wKingYu 阅读(21) 评论(0) 推荐(1)
摘要: 在出栈时需要进行两步操作,即先 top( ) 获得栈顶元素,再 pop( ) 删除栈顶元素 阅读全文
posted @ 2022-04-22 21:49 wKingYu 阅读(26) 评论(0) 推荐(0)
摘要: ![image](https://img2022.cnblogs.com/blog/2674359/202204/2674359-20220422213958989-1883945665.png) 阅读全文
posted @ 2022-04-22 21:41 wKingYu 阅读(26) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> #include<vector> using namespace std; int main() { // 初始化 a 为 1, 2, 3 vector<int> a({1, 2, 3}); // 也可以是 vector<int> a {1, 2, 阅读全文
posted @ 2022-04-22 19:26 wKingYu 阅读(35) 评论(0) 推荐(0)
摘要: 点击查看代码 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ cla 阅读全文
posted @ 2022-04-22 17:28 wKingYu 阅读(32) 评论(0) 推荐(0)