菜鸟也要飞的高
菜鸟也要飞的高
全部文章
题解
归档
标签
去牛客网
登录
/
注册
菜鸟也要飞的高的博客
全部文章
/ 题解
(共48篇)
在二叉树中找到两个节点的最近公共祖先
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * } */ public class Sol...
2020-11-19
1
433
用两个栈实现队列
import java.util.Stack; public class Solution { Stack<Integer> stack1 = new Stack<Integer>(); Stack<Integer> stack2 = new S...
2020-11-19
0
370
删除链表的倒数第n个节点
import java.util.*; /* * public class ListNode { * int val; * ListNode next = null; * } */ public class Solution { /** * * @...
2020-11-19
0
439
链表中的节点每k个一组翻转
import java.util.*; /* * public class ListNode { * int val; * ListNode next = null; * } */ public class Solution { /** * * @...
2020-11-19
0
599
跳台阶
public class Solution { public int JumpFloor(int target) { if(target==0) { return 0; } if(target==1) ...
2020-11-19
0
374
求二叉树的层序遍历
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * } */ public class So...
2020-11-19
0
488
最小的K个数
import java.util.*; public class Solution { public ArrayList<Integer> GetLeastNumbers_Solution(int [] input, int k) { ArrayList<...
2020-11-19
0
352
合并有序链表
import java.util.*; /* * public class ListNode { * int val; * ListNode next = null; * } */ public class Solution { /** * * @...
2020-11-19
0
513
寻找第K大
import java.util.*; public class Finder { public static int findKth(int[] a, int n, int K) { return quickSort(a,0,n-1,K); // wri...
2020-11-19
0
496
实现二叉树先序,中序和后序遍历
import java.util.*; public class Solution { /** * * @param root TreeNode类 the root of binary tree * @return int整型二维数组 */ ...
2020-11-19
0
439
首页
上一页
1
2
3
4
5
下一页
末页