wydxry
wydxry
全部文章
分类
题解(86)
归档
标签
去牛客网
登录
/
注册
wydxry的博客
全部文章
(共91篇)
题解 | #二叉搜索树的最近公共祖先#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
C++
2022-04-18
0
311
题解 | #【模板】链表#
#include <bits/stdc++.h> using namespace std; struct Node { int v; Node *next; Node(int x): v(x), next(NULL) {} }; int main() { ...
C++
2022-04-18
0
417
题解 | #点击消除#
#include <bits/stdc++.h> using namespace std; int main() { stack<char> st; string s; cin>>s; for (auto& c: s) { ...
C++
2022-04-18
0
381
题解 | #逆波兰表达式求值#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param tokens string字符串vector * @return int整型...
C++
2022-04-18
0
394
题解 | #栈的压入、弹出序列#
class Solution { public: bool IsPopOrder(vector<int> pushV,vector<int> popV) { stack<int> st; int n = pushV.size...
C++
2022-04-18
0
338
题解 | #从中序与后序遍历序列构造二叉树#
某厂笔试题 /** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(null...
C++
2022-04-18
0
401
题解 | #统计字符串中各类型字符的个数#
#include <iostream> #include <cstring> using namespace std; int main() { int letter = 0; int digit = 0; int space = 0; i...
C++
2022-04-18
0
312
题解 | #统计字符串中各字母字符对应的个数#
#include <iostream> #include <map> // write your code here...... using namespace std; int main() { char str[100] = { 0 }; cin.g...
C++
2022-04-18
0
311
题解 | #查找#
#include<bits/stdc++.h> using namespace std; int main(){ set<int>s; //write your code here...... int n, m, x; cin>>n>>m...
C++
2022-04-18
0
319
题解 | #移动 0#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型vector * @return int整型vector...
C++
2022-04-17
0
343
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页