首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
成程晨
华中科技大学
2020届
Java工程师
铁头娃
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(157)
构建乘积数组
1
// 动态规划 import java.util.ArrayList; public class Solution { public int[] multiply(int[] A) { int[] B = new int[A.length]; if(A.len...
发表于 2019-02-21 15:55:38
滑动窗口的最大值
1
import java.util.*; public class Solution { /**使用单调队列解决*/ public ArrayList<Integer> maxInWindows(int [] array, int size) { Linke...
发表于 2019-02-21 15:35:20
机器人的运动范围
1
public class Solution { private int count = 0; public int movingCount(int threshold, int rows, int cols) { dfs(threshold, 0, 0, rows, ...
发表于 2019-02-20 17:41:06
矩阵中的路径
1
// 图的深度优先遍历 import java.util.*; public class Solution { public boolean hasPath(char[] matrix, int rows, int cols, char[] str){ if(rows <...
发表于 2019-02-20 17:25:38
序列化二叉树
1
public class Solution { private int curIdx = 1; String Serialize(TreeNode root) { StringBuffer sb = new StringBuffer(); preOrd...
发表于 2019-02-20 16:29:42
把二叉树打印成多行
1
// 连着3个层次遍历题 有意思吗 import java.util.*; public class Solution { ArrayList<ArrayList<Integer>> Print(TreeNode r) { ArrayList<A...
发表于 2019-02-20 16:02:46
按之字形顺序打印二叉树
1
import java.util.*; public class Solution { public ArrayList<ArrayList<Integer>> Print(TreeNode r) { ArrayList<ArrayList<...
发表于 2019-02-20 15:56:50
对称的二叉树
1
import java.util.*; public class Solution { boolean isSymmetrical(TreeNode r){ if(r == null) return true; List<TreeNode> que...
发表于 2019-02-20 15:43:08
二叉树的下一个结点
1
public class Solution { public TreeLinkNode GetNext(TreeLinkNode pNode){ if(pNode == null) return null; if(pNode.right == null) {/...
发表于 2019-02-20 14:59:22
删除链表中重复的结点
1
public class Solution { public ListNode deleteDuplication(ListNode pHead){ ListNode h = new ListNode(666),ht = h,pre = null,cur = pHead; ...
发表于 2019-02-20 14:40:07
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题