qzjs
qzjs
全部文章
分类
LeetCode(3)
剑指offer(Java实现)(38)
华为机试(1)
基础知识及算法(2)
未归档(42)
牛客网(华为机试)(1)
纠删码(1)
归档
标签
去牛客网
登录
/
注册
永不止步
全部文章
(共88篇)
剑指offer(28)数组中出现次数超过一半的数字
public class Solution { public int MoreThanHalfNum_Solution(int [] array) { int candidate = 0;//候选 int count = 0;//次数 for(...
2019-04-01
0
476
剑指offer(27)字符串的排列
import java.util.ArrayList; import java.util.Collections; public class Solution { public ArrayList<String> Permutation(String str) { ...
2019-04-01
0
496
剑指offer(25)复制含有随机指针节点的链表
class RandomListNode{ int lebal; RandomListNode next; RandomListNode random; public RandomListNode(int lebal){ this.lebal = le...
2019-04-01
0
540
剑指offer(24)二叉树中和为某一值的路径
import java.util.ArrayList; import java.util.Comparator; import java.util.Collections; /** public class TreeNode { int val = 0; TreeNode left ...
2019-03-28
0
388
剑指offer(23)二叉搜索树的后序遍历序列
public class Solution { //二叉搜索树的后续遍历 //后序排序:数组的最后一个节点为头节点 //搜索二叉树:左子树比根节点小,右子树比根节点大 public boolean VerifySquenceOfBST(int [] sequence) { ...
2019-03-28
0
513
剑指offer(22)从上往下打印二叉树
import java.util.ArrayList; import java.util.Queue; import java.util.LinkedList; /** public class TreeNode { int val = 0; TreeNode left = null...
2019-03-27
0
494
剑指offer(21)栈的压入弹出
package OfferTest; //栈的压入,弹出序列 import java.util.Stack; public class NoTwentyone { public static boolean IsPopOrder(int[] pushA,int[] popA){ ...
2019-03-27
0
481
剑指offer(20)包含min函数的栈
import java.util.Stack; import java.util.Iterator; public class Solution { Stack<Integer> stack = new Stack<Integer>(); pub...
2019-03-26
0
426
剑指offer(19)顺时针打印出矩阵的元素
package OfferTest; //顺时针打印矩阵 import java.util.ArrayList; public class NoNineth { public static ArrayList<Integer> printMatrix(int[][] ...
2019-03-26
0
386
剑指offer(18)二叉树镜像
/** public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.val = v...
2019-03-22
0
426
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页