苏觅云
苏觅云
全部文章
题解
归档
标签
去牛客网
登录
/
注册
苏觅云的博客
全部文章
/ 题解
(共130篇)
题解 | #矩阵中的路径#
import java.util.*; class Solution { public boolean hasPath(char[][] board, String word) { boolean[][] visited = new boolean[board.lengt...
Java
2022-05-07
0
283
题解 | #矩形覆盖#
public class Solution { public int rectCover(int target) { if(target == 0) { return 0; } int[] dp = new int[ta...
Java
2022-05-07
0
264
题解 | #二进制中1的个数#
public class Solution { public int NumberOf1(int n) { int cnt = 0; while (n != 0) { cnt++; n &= (n - 1...
Java
2022-05-07
0
246
题解 | #表示数值的字符串#
import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param str string字符串 * @...
Java
2022-05-07
0
259
题解 | #把数字翻译成字符串#
import java.util.*; public class Solution { /** * 解码 * @param nums string字符串 数字串 * @return int整型 */ public int solve (St...
Java
2022-05-07
0
315
题解 | #扑克牌顺子#
import java.util.*; public class Solution { public boolean IsContinuous(int [] numbers) { if(numbers == null || numbers.length != 5) { ...
Java
2022-05-07
0
290
题解 | #求1+2+3+...+n#
public class Solution { public int Sum_Solution(int n) { boolean flag = (n > 0) && (n += Sum_Solution(n - 1)) > 0; r...
Java
2022-05-07
0
305
题解 | #不用加减乘除做加法#
public class Solution { public int Add(int num1,int num2) { if(num2 == 0) { return num1; } else { return A...
Java
2022-05-07
0
283
题解 | #把字符串转换成整数(atoi)#
import java.util.*; class Solution { public boolean isNumChar(char ch) { return ch >= '0' && ch <= '9'; } public i...
Java
2022-05-07
0
328
题解 | #把字符串转换成整数#
public class Solution { public boolean isNumChar(char ch) { return ch >= '0' && ch <= '9'; } public int StrToInt(Str...
Java
2022-05-07
0
327
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页