今天开始不再摆烂
今天开始不再摆烂
全部文章
题解
归档
标签
去牛客网
登录
/
注册
今天开始不再摆烂的博客
全部文章
/ 题解
(共45篇)
题解 | #判断一个链表是否为回文结构#
/** struct ListNode { int val; struct ListNode *next; }; */ class Solution { public: /** * * @param head ListNode类 the head * @return bool布尔型 */ boo...
C++
2022-01-24
0
291
题解 | #旋转数组的最小数字#
class Solution { public: int minNumberInRotateArray(vector<int> rotateArray) { if(rotateArray.empty()) return 0; int l = 0, r = ro...
C++
2022-01-24
0
271
题解 | #旋转数组的最小数字#
class Solution { public: int minNumberInRotateArray(vector rotateArray) { if(rotateArray.empty()) return 0; int r = rotateArray.size() - 1; int is_fro...
C++
2022-01-24
0
297
题解 | #反转数字#
/** struct ListNode { int val; struct ListNode *next; }; */ class Solution { public: /** * * @param head ListNode类 the head node * @return ListNode类...
C++
2022-01-24
0
310
题解 | #找到搜索二叉树中两个错误的节点#
/** struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; }; */ class Solution { public: /** * * @param root TreeNode类 the root ...
C++
2022-01-24
0
267
题解 | #反转数字#
class Solution { public: /** * * @param x int整型 * @return int整型 */ int reverse(int x) { // write code here bool flag = 1; if(x < 0) fla...
C++
2022-01-24
0
212
题解 | #回文数字#
class Solution { public: /** * * @param x int整型 * @return bool布尔型 */ bool isPalindrome(int x) { // write code here string s = to_string(x); ...
C++
2022-01-24
0
222
题解 | #最长公共前缀#
class Solution { public: /** * * @param strs string字符串vector * @return string字符串 */ string longestCommonPrefix(vector& strs) { // write code here ...
C++
2022-01-24
0
243
题解 | #有效括号序列#
class Solution { public: /** * * @param s string字符串 * @return bool布尔型 */ bool isValid(string s) { // write code here stack stk; for(int i = 0; i &...
C++
2022-01-23
0
299
题解 | #求路径#
class Solution { public: /** * * @param m int整型 * @param n int整型 * @return int整型 */ int uniquePaths(int m, int n) { // write code here vector<vecto...
C++
2022-01-23
0
277
首页
上一页
1
2
3
4
5
下一页
末页