这不是我的名字0220
这不是我的名字0220
全部文章
题解
归档
标签
去牛客网
登录
/
注册
这不是我的名字0220的博客
全部文章
/ 题解
(共8篇)
字符流中第一个不重复的字符
import java.util.*; public class Solution { LinkedHashMap<Character, Boolean> map=new LinkedHashMap(); //Insert one char from stringstr...
2020-05-24
0
439
求1+2+3+...+n
参考这个解法 https://leetcode-cn.com/problems/qiu-12n-lcof/solution/yan-jiu-liao-ban-tian-zhong-yu-kan-dong-da-lao-de-/ 这是大佬的源码; /** * 负数在参与位运算...
2020-05-22
1
482
和为S的连续正数序列
public static ArrayList<ArrayList<Integer>> FindContinuousSequence(int sum) { ArrayList<ArrayList<Integer>> doubleArra...
2020-05-20
0
513
两个链表的第一个公共结点
其实就是相当于把两个链表给串接起来,然后找出相似的值。解法一: public class Solution { public ListNode FindFirstCommonNode(ListNode pHead1, ListNode pHead2) { if(pHead1 ...
2020-05-18
0
428
栈-min()
class Solution2 { private Stack<Integer> stack1 = new Stack<Integer>();//用来存放数据 private Integer min = Integer.MAX_VALUE;//用来存放最小值 ...
2020-04-21
0
539
双指针-链表
/* public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; } }*/ public class Solution { ...
2020-04-18
0
549
剑指0ffer-数组
public class Solution { public void reOrderArray(int [] array) { //在原数组上处理 int j;//用于记录当前奇数的索引值 int k = 0;//用于记录当前排头的奇数个数 ...
2020-04-18
0
397
[编程题]二维数组中的查找
int init_num = array[0][0]; int find_num = target; int aa_length = array[0].length; int aa_weight = array.length; if...
2020-04-13
0
379