wydxry
wydxry
全部文章
分类
题解(86)
归档
标签
去牛客网
登录
/
注册
wydxry的博客
全部文章
(共91篇)
题解 | #数组中只出现一次的两个数字#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param array int整型vector * @return int整型vecto...
C++
2021-11-08
1
381
题解 | #第一个只出现一次的字符#
class Solution { public: int FirstNotRepeatingChar(string str) { unordered_map<char, int> mp; for(int i=0;i<str.length();...
C++
2021-11-08
1
392
题解 | #替换空格#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param s string字符串 * @return string字符串 *...
2021-11-08
1
333
题解 | #旋转数组#
class Solution { public: /** * 旋转数组 * @param n int整型 数组长度 * @param m int整型 右移距离 * @param a int整型vector 给定数组 * @return int...
C++
2021-11-08
2
394
题解 | #判断是否为回文字符串#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param str string字符串 待判断的字符串 * @return bool布尔型 *...
C++
2021-11-08
0
289
题解 | #反转字符串#
class Solution { public: /** * 反转字符串 * @param str string字符串 * @return string字符串 */ string solve(string str) { // ...
C++
2021-11-08
0
322
题解 | #编写函数实现两数交换(指针方式)#
#include <iostream> #include <bits/stdc++.h> using namespace std; // write your code here...... int main() { int m, n; cin >...
C++
2021-11-08
4
687
题解 | #不死神兔问题#
#include <iostream> using namespace std; int getSum(int n); int main() { int n; cin >> n; cout << getSum(n) <<...
C++
2021-11-08
3
487
题解 | #比较字符串大小#
#include <iostream> using namespace std; int mystrcmp(const char* src, const char* dst); int main() { char s1[100] = { 0 }; char s2[1...
C++
2021-11-08
10
787
题解 | #创建动态数组#
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; // write your cod...
C++
2021-11-08
7
651
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页