桃ちゃん
桃ちゃん
全部文章
分类
题解(35)
归档
标签
去牛客网
登录
/
注册
桃ちゃん的博客
全部文章
(共34篇)
题解 | #左旋转字符串#
import java.lang.*; public class Solution { public String LeftRotateString(String str,int n) { if(str==null||str.length()==0) return "...
Java
2021-09-26
0
327
题解 | #扑克牌顺子#
import java.lang.*; import java.util.*; public class Solution { public boolean IsContinuous(int [] numbers) { HashSet<Integer> set = ...
Java
2021-09-20
0
362
题解 | #和为S的两个数字#
import java.util.ArrayList; public class Solution { public ArrayList<Integer> FindNumbersWithSum(int [] array,int sum) { ArrayList&l...
Java
2021-09-20
0
523
题解 | #把字符串转换成整数#
import java.util.*; import java.lang.*; public class Solution { public int StrToInt(String str) { if(str==""||str.length()==0) r...
Java
2021-09-20
0
416
题解 | #求1+2+3+...+n#
public class Solution { public int Sum_Solution(int n) { int res =n; boolean flag=(n>0)&&(res+=Sum_Solution(n-1))>0; ...
Java
2021-09-20
0
423
题解 | #反转链表#
/* public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; } }*/ public class Solution { ...
Java
2021-09-19
0
388
题解 | #从上往下打印二叉树#
import java.util.ArrayList; import java.util.*; /** public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; ...
Java
2021-09-18
0
344
题解 | #把数组排成最小的数#
import java.util.ArrayList; import java.lang.*; import java.util.*; public class Solution { public String PrintMinNumber(int [] numbers) { ...
Java
2021-09-18
0
423
题解 | #和为S的连续正数序列#
import java.util.ArrayList; public class Solution { public ArrayList<ArrayList<Integer> > FindContinuousSequence(int sum) { ArrayL...
Java
2021-09-16
0
425
题解 | #栈的压入、弹出序列#
import java.util.ArrayList; import java.util.*; public class Solution { public boolean IsPopOrder(int [] pushA,int [] popA) { if(pushA.lengt...
Java
2021-09-16
0
321
首页
上一页
1
2
3
4
下一页
末页