牛马ID
牛马ID
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛马ID的博客
全部文章
/ 题解
(共66篇)
题解 | #二叉树中和为某一值的路径(一)#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * } */ public class Sol...
Java
2022-04-21
0
246
题解 | #字符串通配符#
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); String sour...
Java
2022-04-18
0
313
题解 | #按之字形顺序打印二叉树#
import java.util.*; /* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { ...
Java
2022-04-12
0
253
题解 | #求二叉树的层序遍历#
BFS public ArrayList<ArrayList<Integer>> levelOrder (TreeNode root) { ArrayList<ArrayList<Integer>> list = new Ar...
Java
2022-04-12
0
308
题解 | #二叉树的后序遍历#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * public TreeNode(int v...
Java
2022-04-12
0
282
题解 | #二叉树的中序遍历#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * public TreeNode(int v...
Java
2022-04-12
0
302
题解 | #二叉树的前序遍历#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * public TreeNode(int v...
Java
2022-04-12
0
385
题解 | #比较版本号#
import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 比较版本号 * @param version1 strin...
Java
2022-04-11
0
326
题解 | #旋转数组的最小数字#
import java.util.ArrayList; public class Solution { public int minNumberInRotateArray(int [] nums) { int l = 0, r = nums.length - 1; ...
Java
2022-04-11
0
286
题解 | #数组中的逆序对#
public class Solution { public final long mod = 1000000007; private int ans = 0; // 在进行归并的时查看是否存在逆序! public int InversePairs(int [] ar...
Java
2022-04-11
0
294
首页
上一页
1
2
3
4
5
6
7
下一页
末页