Coder789
Coder789
全部文章
分类
题解(31)
归档
标签
去牛客网
登录
/
注册
Coder789的博客
全部文章
(共31篇)
题解 | #二维数组中的查找#
public class Solution { public boolean Find(int target, int [][] array) { if(array == null || array.length == 0 || array[0].length == 0){ ...
数组
2021-09-02
0
289
题解 | #左旋转字符串#
public class Solution { public String LeftRotateString(String str,int n) { int L = str.length(); char[] arr = new char[L]; ...
循环数组
2021-08-28
0
338
题解 | #两个链表的第一个公共结点#
/* public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; } }*/ public class Solution { ...
链表
2021-08-28
0
336
题解 | #按之字形顺序打印二叉树#
import java.util.ArrayList; import java.util.*; /* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; ...
树
2021-08-25
0
317
题解 | #反转链表#
/* public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; } }*/ public class Solution { ...
链表
2021-08-25
0
317
题解 | #和为S的两个数字#
import java.util.*; public class Solution { public ArrayList<Integer> FindNumbersWithSum(int [] array,int sum) { ArrayList<Integ...
双指针
2021-08-23
0
374
题解 | #最小的K个数#
import java.util.*; public class Solution { public ArrayList<Integer> GetLeastNumbers_Solution(int [] input, int k) { PriorityQueue...
最小堆
2021-08-23
0
406
题解 | #包含min函数的栈#
import java.util.Stack; public class Solution { Stack<Integer> dataStack = new Stack<>(); Stack<Integer> minStack = new St...
堆栈
2021-08-23
0
395
题解 | #用两个栈实现队列#
import java.util.Stack; public class Solution { Stack<Integer> stack1 = new Stack<Integer>(); Stack<Integer> stack2 = new S...
堆栈
2021-08-23
0
309
题解 | #第一个只出现一次的字符#
public class Solution { public int FirstNotRepeatingChar(String str) { if(str == null || str.length() == 0){ return -1; ...
数字统计
2021-08-23
0
319
首页
上一页
1
2
3
4
下一页
末页