辣椒酱up
辣椒酱up
全部文章
分类
归档
标签
去牛客网
登录
/
注册
辣椒酱up的博客
全部文章
(共60篇)
题解 | #不同路径的数目(一)#
#include <vector> class Solution { public: int uniquePaths(int m, int n) { vector<vector<int>> dp(m,vector<int>(n)...
2024-03-03
0
153
题解 | #求平方根#
class Solution { public: int mysqrt(int x) { if( x == 0 || x == 1) return x; //处理特殊情况 int top = x / 2; cout<...
2024-03-03
0
134
题解 | #缺失的第一个正整数#
#include <vector> class Solution { public: int minNumberDisappeared(vector<int>& nums) { // write code here //建立一...
2024-03-03
0
179
题解 | #集合的所有子集(一)#
#include <vector> class Solution { private: vector<int> temp; vector<vector<int>> ans; public: void dfs(v...
2024-03-02
0
155
题解 | #顺时针旋转矩阵#
#include <vector> class Solution { public: //一个简单的思路 vector<vector<int> > rotateMatrix(vector<vector<int> >& ...
2024-03-02
0
163
题解 | #数字字符串转化成IP地址#
#include <string> #include <vector> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @pa...
2024-02-29
0
196
题解 | #最长回文子串#
#include <vector> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param A string字符串 * ...
2024-02-29
0
224
题解 | #链表中环的入口结点#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } }; */ class Solution { public: ...
2024-02-28
0
241
题解 | #大数乘法#
int s_arr[101000]; int t_arr[101000]; int ans[1010000];//不知为啥如果将数组定义在函数内部,且动态创建的时候,就会出错,运行结果还不知道是啥 class Solution { public: /** * 代码中的类名、方法名、参数名...
2024-02-28
0
211
题解 | #判断链表中是否有环#
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} ...
2024-02-28
0
192
首页
上一页
1
2
3
4
5
6
下一页
末页