有胆量的柯基在学习
有胆量的柯基在学习
全部文章
分类
归档
标签
去牛客网
登录
/
注册
有胆量的柯基在学习的博客
全部文章
(共112篇)
题解 | 数独
class Solution { public: void solveSudoku(vector<vector<char> >& board) { backtrack(board); } bool backtrack(vec...
2025-09-08
0
24
题解 | 加起来和为目标值的组合(二)
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param num int整型vector * @param target int整型 ...
2025-09-08
0
27
题解 | 通配符匹配
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param s string字符串 * @param p string字符串 ...
2025-09-08
0
24
题解 | 编辑距离(二)
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * min edit cost * @param str1 string字符串 the string ...
2025-09-07
0
16
题解 | 划分链表
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: ...
2025-09-07
0
18
题解 | 将升序数组转化为平衡二叉搜索树
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullpt...
2025-09-07
0
14
题解 | 二叉树中和为某一值的路径(二)
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullpt...
2025-09-07
0
16
题解 | 设计LFU缓存结构
class Solution { public: vector<int> LFU(vector<vector<int> >& ops, int k) { struct LFUCache { int cap...
2025-08-28
0
19
题解 | 设计LRU缓存结构
class Solution { public: Solution(int capacity) : cap(capacity) {} int get(int key) { auto it = mp.find(key); if (it == mp....
2025-08-28
0
32
题解 | 打家劫舍(二)
class Solution { public: int rob(vector<int>& nums) { int n = nums.size(); if (n == 1) return nums[0]; auto l...
2025-08-27
0
24
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页