牛马ID
牛马ID
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛马ID的博客
全部文章
/ 题解
(共81篇)
题解 | #包含min函数的栈#
import java.util.*; public class Solution { Deque<Integer> stack = new LinkedList<>(); Deque<Integer> min = new LinkedList&...
Java
2022-04-25
0
199
题解 | #用两个栈实现队列#
import java.util.Stack; public class Solution { Stack<Integer> stack1 = new Stack<Integer>(); Stack<Integer> stack2 = new S...
Java
2022-04-25
0
181
题解 | #输出二叉树的右视图#
import java.util.*; public class Solution { private Map<Integer,Integer> indexs = new HashMap<>(); private int i = 0; public...
Java
2022-04-23
0
293
题解 | #重建二叉树#
import java.util.*; /** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * T...
Java
2022-04-23
0
292
题解 | #序列化二叉树#
/* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.val = va...
Java
2022-04-23
0
326
题解 | #在二叉树中找到两个节点的最近公共祖先#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * } */ public class Sol...
Java
2022-04-23
0
287
题解 | #二叉搜索树的最近公共祖先#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * public TreeNode(int v...
Java
2022-04-23
0
247
题解 | #判断是不是平衡二叉树#
public class Solution { public boolean IsBalanced_Solution(TreeNode root) { if(root == null) return true; if(Math.abs(getHegih(roo...
Java
2022-04-23
0
227
题解 | #判断是不是完全二叉树#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * public TreeNode(int v...
Java
2022-04-21
0
302
题解 | #判断是不是二叉搜索树#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * public TreeNode(int v...
Java
2022-04-21
0
292
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页