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