Skip to content

Commit edd9432

Browse files
committed
feat: batch submit by kimi k2.5
1 parent cfa2719 commit edd9432

432 files changed

Lines changed: 20313 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
#include "leetcode/core.h"
3+
4+
namespace leetcode {
5+
namespace problem_456 {
6+
7+
using Func = std::function<bool(vector<int>&)>;
8+
9+
class Pattern132Solution : public SolutionBase<Func> {
10+
public:
11+
//! 456. 132 Pattern
12+
//! https://leetcode.com/problems/132-pattern/
13+
bool find132pattern(vector<int>& nums);
14+
15+
Pattern132Solution();
16+
};
17+
18+
} // namespace problem_456
19+
} // namespace leetcode
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
#include "leetcode/core.h"
3+
4+
namespace leetcode {
5+
namespace problem_623 {
6+
7+
using Func = std::function<TreeNode*(TreeNode*, int, int)>;
8+
9+
class AddOneRowToTreeSolution : public SolutionBase<Func> {
10+
public:
11+
//! 623. Add One Row to Tree
12+
//! https://leetcode.com/problems/add-one-row-to-tree/
13+
TreeNode* addOneRow(TreeNode* root, int val, int depth);
14+
15+
AddOneRowToTreeSolution();
16+
};
17+
18+
} // namespace problem_623
19+
} // namespace leetcode
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
#include "leetcode/core.h"
3+
4+
namespace leetcode {
5+
namespace problem_999 {
6+
7+
using Func = std::function<int(vector<vector<char>>&)>;
8+
9+
class AvailableCapturesForRookSolution : public SolutionBase<Func> {
10+
public:
11+
//! 999. Available Captures for Rook
12+
//! https://leetcode.com/problems/available-captures-for-rook/
13+
int numRookCaptures(vector<vector<char>>& board);
14+
15+
AvailableCapturesForRookSolution();
16+
};
17+
18+
} // namespace problem_999
19+
} // namespace leetcode
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "leetcode/core.h"
2+
3+
namespace leetcode {
4+
namespace problem_122 {
5+
6+
using Func = std::function<int(vector<int>&)>;
7+
8+
class BestTimeToBuyAndSellStockIiSolution : public SolutionBase<Func> {
9+
public:
10+
int maxProfit(vector<int>& prices);
11+
BestTimeToBuyAndSellStockIiSolution();
12+
};
13+
14+
} // namespace problem_122
15+
} // namespace leetcode
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include "leetcode/core.h"
2+
3+
namespace leetcode {
4+
namespace problem_401 {
5+
6+
using Func = std::function<vector<string>(int)>;
7+
8+
class BinaryWatchSolution : public SolutionBase<Func> {
9+
public:
10+
//! 401. Binary Watch
11+
//! https://leetcode.com/problems/binary-watch/
12+
vector<string> readBinaryWatch(int turnedOn);
13+
14+
BinaryWatchSolution();
15+
};
16+
17+
} // namespace problem_401
18+
} // namespace leetcode
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include "leetcode/core.h"
2+
3+
namespace leetcode {
4+
namespace problem_898 {
5+
6+
using Func = std::function<int(vector<int>&)>;
7+
8+
class BitwiseOrsOfSubarraysSolution : public SolutionBase<Func> {
9+
public:
10+
//! 898. Bitwise ORs of Subarrays
11+
//! https://leetcode.com/problems/bitwise-ors-of-subarrays/
12+
int subarrayBitwiseORs(vector<int>& arr);
13+
14+
BitwiseOrsOfSubarraysSolution();
15+
};
16+
17+
} // namespace problem_898
18+
} // namespace leetcode
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "leetcode/core.h"
2+
3+
namespace leetcode {
4+
namespace problem_2392 {
5+
6+
using Func = std::function<vector<vector<int>>(int, vector<vector<int>>&, vector<vector<int>>&)>;
7+
8+
class BuildAMatrixWithConditionsSolution : public SolutionBase<Func> {
9+
public:
10+
//! 2392. Build a Matrix With Conditions
11+
//! https://leetcode.com/problems/build-a-matrix-with-conditions/
12+
vector<vector<int>> buildMatrix(int k, vector<vector<int>>& rowConditions,
13+
vector<vector<int>>& colConditions);
14+
15+
BuildAMatrixWithConditionsSolution();
16+
};
17+
18+
} // namespace problem_2392
19+
} // namespace leetcode
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
#include "leetcode/core.h"
3+
4+
namespace leetcode {
5+
namespace problem_1920 {
6+
7+
using Func = std::function<vector<int>(vector<int>&)>;
8+
9+
class BuildArrayFromPermutationSolution : public SolutionBase<Func> {
10+
public:
11+
//! 1920. Build Array from Permutation
12+
//! https://leetcode.com/problems/build-array-from-permutation/
13+
vector<int> buildArray(vector<int>& nums);
14+
15+
BuildArrayFromPermutationSolution();
16+
};
17+
18+
} // namespace problem_1920
19+
} // namespace leetcode
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include "leetcode/core.h"
2+
3+
namespace leetcode {
4+
namespace problem_1023 {
5+
6+
using Func = std::function<vector<bool>(vector<string>&, string)>;
7+
8+
/**
9+
* 1023. Camelcase Matching
10+
* https://leetcode.com/problems/camelcase-matching/
11+
*
12+
* 判断 queries 中的每个字符串是否匹配 pattern
13+
* 匹配规则:可以在 pattern 中插入小写字母得到 query
14+
*/
15+
class CamelcaseMatchingSolution : public SolutionBase<Func> {
16+
public:
17+
vector<bool> camelMatch(vector<string>& queries, string pattern);
18+
19+
CamelcaseMatchingSolution();
20+
};
21+
22+
} // namespace problem_1023
23+
} // namespace leetcode
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include "leetcode/core.h"
2+
3+
namespace leetcode {
4+
namespace problem_464 {
5+
6+
using Func = std::function<bool(int, int)>;
7+
8+
class CanIWinSolution : public SolutionBase<Func> {
9+
public:
10+
//! 464. Can I Win
11+
//! https://leetcode.com/problems/can-i-win/
12+
bool canIWin(int maxChoosableInteger, int desiredTotal);
13+
14+
CanIWinSolution();
15+
};
16+
17+
} // namespace problem_464
18+
} // namespace leetcode

0 commit comments

Comments
 (0)