wydxry
wydxry
全部文章
题解
归档
标签
去牛客网
登录
/
注册
wydxry的博客
全部文章
/ 题解
(共86篇)
题解 | #从中序与后序遍历序列构造二叉树#
某厂笔试题 /** * 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
题解 | #数组中只出现一次的数(其它数出现k次)#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arr intvector * @param k int * @...
C++
2022-04-17
0
327
题解 | #旋转字符串#
class Solution { public: /** * 旋转字符串 * @param A string字符串 * @param B string字符串 * @return bool布尔型 */ bool solve(stri...
C++
2022-04-17
0
299
题解 | #求平方根#
class Solution { public: /** * * @param x int整型 * @return int整型 */ int mysqrt(int x) { // write code here ...
C++
2022-04-16
0
289
题解 | #买卖股票的最好时机(一)#
class Solution { public: /** * * @param prices int整型vector * @return int整型 */ int maxProfit(vector<int>& price...
C++
2022-04-16
0
263
题解 | #去除字符串中重复的字符#
#include <iostream> #include <set> // write your code here...... using namespace std; int main() { char str[100] = { 0 }; cin.g...
C++
2022-04-15
0
350
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页