万千少男的梦
万千少男的梦
全部文章
分类
归档
标签
去牛客网
登录
/
注册
万千少男的梦的博客
全部文章
(共91篇)
题解 | #排序#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 将给定数组排序 * @param arr int整型vector 待排序的数组 * @return...
2024-05-23
1
187
题解 | #有效括号序列#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param s string字符串 * @return bool布尔型 */ ...
2024-05-23
1
210
题解 | #二叉树的镜像#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * ...
2024-05-23
1
174
题解 | #判断一个链表是否为回文结构#
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /...
2024-05-23
1
201
题解 | #盛水最多的容器#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param height int整型vector * @return int整型 ...
2024-05-21
1
208
题解 | #快乐数#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @return bool布尔型 */ ...
2024-05-21
1
218
题解 | #二叉树遍历#
#include <stdio.h> #include <stdlib.h> typedef struct BinTree { struct BinTree*left; struct BinTree*right; char val; }BT; BT...
2024-05-13
1
217
题解 | #判断是否为回文字符串#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param str string字符串 待判断的字符串 * @return bool布尔型 */ bool judge(char* str ) { // write code h...
2024-05-13
1
193
题解 | #二分查找-I#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @param numsLen int nums数组长度 * @param target int整型 * @return int整型 ...
2024-05-13
1
168
题解 | #二叉树的中序遍历#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * ...
2024-05-11
1
145
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页