首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
成程晨
华中科技大学
2020届
Java工程师
铁头娃
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(157)
二叉树中和为某一值的路径(二)
1
import java.util.*; public class Solution { public ArrayList<ArrayList<Integer>> FindPath(TreeNode root,int target) { ArrayLis...
发表于 2019-02-15 21:06:36
二叉搜索树的后序遍历序列
1
public class Solution { public boolean VerifySquenceOfBST(int [] post) { if(post.length == 0 || !helper(post,0,post.length - 1)) { ...
发表于 2019-02-15 20:54:42
从上往下打印二叉树
0
import java.util.*; public class Solution { public ArrayList<Integer> PrintFromTopToBottom(TreeNode root) { ArrayList<Integer>...
发表于 2019-02-15 20:24:55
栈的压入、弹出序列
1
import java.util.ArrayList; public class Solution { public boolean IsPopOrder(int [] pushA,int [] popA) { int[] stack = new int[pushA.len...
发表于 2019-02-15 20:19:41
包含min函数的栈
1
import java.util.*; public class Solution { private Map<Integer,Integer> map = new TreeMap<>(); //使用map记录每个元素在栈中出现的个数,TreeMap保证为排序 ...
发表于 2019-02-12 19:26:30
顺时针打印矩阵
1
/* leetcode原题 思路:递归 helper(rs,re,cs,ce,m,res) rs:RowStart re:RowEnd cs:ColumnStart ce:ColumnEnd 每进行一次helper,将以上边界按照 左->右...
发表于 2019-02-12 18:59:22
树的子结构
1
import java.util.*; public class Solution { private Set<TreeNode> set = new HashSet<>(); // 存储root可能的根节点,这些节点的值与root2的根节点值相同 publ...
发表于 2019-02-12 18:38:44
合并两个排序的链表
1
public class Solution { public ListNode Merge(ListNode list1,ListNode list2) { // 归并排序思想 ListNode h = new ListNode(666),head = h; ...
发表于 2019-02-12 18:18:49
反转链表
1
public class Solution { public ListNode ReverseList(ListNode head) { // 头插法 ListNode h = new ListNode(666); while(head != ...
发表于 2019-02-12 18:12:05
链表中倒数第k个结点
1
public class Solution { public ListNode FindKthToTail(ListNode head,int k) { ListNode fast = head,slow = head; while(k > 0 &...
发表于 2019-02-12 18:09:05
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题