qzjs
qzjs
全部文章
未归档
LeetCode(3)
剑指offer(Java实现)(38)
华为机试(1)
基础知识及算法(2)
牛客网(华为机试)(1)
纠删码(1)
归档
标签
去牛客网
登录
/
注册
永不止步
全部文章
/ 未归档
(共42篇)
LeetCode刷题(4)
题目描述 Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull. Follow up: Can you solve it without using ext...
2019-05-18
0
361
LeetCode刷题(3)
题目描述 Given a singly linked list L: L 0→L 1→…→L n-1→L n, reorder it to: L 0→L n →L 1→L n-1→L 2→L n-2→… You must do this in-place without altering ...
2019-05-18
0
363
LeetCode刷题(2)
题目描述 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are+,-,*,/. Each operand may be an integer or ano...
2019-05-15
0
437
华为机试(3)
题目描述 明明想在学校中请一些同学一起做一项问卷调查,为了实验的客观性,他先用计算机生成了N个1到1000之间的随机整数(N≤1000),对于其中重复的数字,只保留一个,把其余相同的数去掉,不同的数对应着不同的学生的学号。然后再把这些数从小到大排序,按照排好的顺序去找同学做调查。请你协助明明...
2019-05-15
0
619
leetCode刷题(1)
题目描述 Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the near...
2019-05-15
0
371
剑指offer(65)矩阵中的路径
public class Solution { //回溯法:使用回溯法,回溯法可以看作看成蛮力法的升级版,从解决问题的每一步的所有可能选项里系统地选出一个可行的解决方案,回溯法非常 //适合由多个步骤组成的问题,并且每个步骤有多个选择,当我们在某一步选择了其中一个选项时,就进入下一步...
2019-04-23
0
345
剑指offer(64)滑动窗口的最大值
import java.util.ArrayList; import java.util.LinkedList; public class Solution { public ArrayList<Integer> maxInWindows(int [] num, int siz...
2019-04-22
0
373
剑指offer(63)求数据流的中位数
import java.util.PriorityQueue; import java.util.Comparator; public class Solution {//小顶堆是PriorityQueue的默认结构,所以大顶堆需要重写compare方法,做一个比较器 private Pr...
2019-04-22
0
430
剑指offer(62)二叉树第k个节点
一 非递归方式 /* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { thi...
2019-04-21
0
327
剑指offer(61)二叉树的序列化与反序列化
一 先序遍历 /* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { thi...
2019-04-21
0
339
首页
上一页
1
2
3
4
5
下一页
末页