牛客159707358号
牛客159707358号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客159707358号的博客
TA的专栏
40篇文章
0人订阅
剑指offer回顾
40篇文章
116人学习
全部文章
(共99篇)
题解 | 第一个只出现一次的字符 哈希
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param str string字符串 * @return int整型 */ ...
2025-02-27
0
59
题解 | 二叉搜索树的最近公共祖先
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
2025-02-27
0
42
题解 | 数字序列中某一位的数字 思路对,注意范围
#include<cmath> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @retur...
2025-02-26
0
49
题解 | 两个链表的第一个公共结点
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { public: ListNode* FindF...
2025-02-26
0
62
题解 | 合并两个排序的链表
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
2025-02-25
0
52
题解 | 链表中倒数最后k个结点 双指针法
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
2025-02-25
0
54
题解 | 用两个栈实现队列: 通过栈调节顺序
class Solution { public: void push(int node) { if(stack1.size()) { while(stack1.size()) { ...
2025-02-25
0
49
题解 | 从尾到头打印链表
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : * val(x), next(NULL) { * } *...
2025-02-25
0
54
题解 | 从尾到头打印链表
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : * val(x), next(NULL) { * } *...
2025-02-25
0
48
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页