Dfine
Dfine
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Dfine的博客
全部文章
(共78篇)
题解 | 找出字符串
class Finder { public: int findString(vector<string> str, int n, string x) { // write code here int start =0; int en...
2025-07-09
0
28
题解 | 元素查找
#include <algorithm> #include <vector> class Finder { public: int findElement(vector<int> A, int n, int x) { // write ...
2025-07-08
0
26
题解 | 约瑟夫问题II
#include <vector> class Joseph { public: int getResult(int n) { // write code here vector<int> people; for (...
2025-07-08
0
27
题解 | 约瑟夫问题I
#include <any> #include <vector> class Joseph { public: int getResult(int n, int m) { // write code here int res=0; ...
2025-07-08
0
23
题解 | 堆箱子
#include <algorithm> #include <tuple> #include <vector> class Box { public: int getHeight(vector<int> w, vector<int>...
2025-07-08
0
26
题解 | 数字发音
#include <string> #include <vector> class ToString { vector<string> below20 = {"", "One", "Two", &...
2025-07-07
0
21
题解 | 子串判断
#include <vector> class Substr { public: vector<bool> chkSubStr(vector<string> p, int n, string s) { // write code here ...
2025-07-07
0
23
题解 | 下一个较大元素
#include <stack> #include <vector> class NextElement { public: vector<int> findNext(vector<int> A, int n) { // w...
2025-07-07
0
21
题解 | 另类加法
class UnusualAdd { public: int addAB(int A, int B) { // write code here while (B) { int sum = A ^ B; int c...
2025-07-07
0
23
题解 | 树转链表
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(N...
2025-07-07
0
19
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页