…201907250756207
…201907250756207
全部文章
分类
归档
标签
去牛客网
登录
/
注册
…201907250756207的博客
全部文章
(共25篇)
题解 | 跳台阶扩展问题
static int count = 0; /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param number int整型 * @return int整型 */ int jumpFloorII(int number ) { ...
2026-03-13
0
33
题解 | 矩形覆盖
static int count = 0; int fun(int number) { if (number < 0) { return 0; } if (number == 0) { count++; } fun...
2026-03-13
0
37
题解 | 跳台阶
static int count = 0; /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param number int整型 * @return int整型 */ int jumpFloor(int number ) { ...
2026-03-13
0
37
题解 | 斐波那契数列
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @return int整型 */ int Fibonacci(int n ) { // write code here if(n ==1...
2026-03-13
0
39
题解 | 剪绳子
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @return int整型 */ int cutRope(int n ) { // write code here int i = 0, m...
2026-03-12
0
33
题解 | 连续子数组的最大和
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param array int整型一维数组 * @param arrayLen int array数组长度 * @return int整型 */ int FindGreatestSumO...
2026-03-12
0
48
题解 | 字符串的排列
// 全局变量 char** result; int resultSize; int* used; // 比较函数用于排序 int cmp(const void* a, const void* b) { return *(char*)a - *(char*)b; } // 回溯函数 vo...
2026-03-11
0
37
题解 | 矩阵中的路径
static int gs_flag = 0; int dfs(int* data, char* matrix, int rows, int cols, int i, int j, char* str, int index) { if (i < 0 || i >...
2026-03-10
0
38
题解 | 机器人的运动范围
int get_val(int num) { int val = 0; val = num / 10 + num % 10; return val; } /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @para...
2026-03-10
0
41
题解 | 查找两个字符串a,b中的最长公共子串
// // Created by gs on 2026/3/6. // // HJ65 查找两个字符串a,b中的最长公共子串 #include <stdio.h> #include <string.h> int main() { char a1[303], a2...
2026-03-07
0
38
首页
上一页
1
2
3
下一页
末页