首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
JiangE
电子科技大学
2017届
Java工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(48)
从上往下打印二叉树
0
public ArrayList<Integer> PrintFromTopToBottom(TreeNode root) { ArrayList<Integer> list = new ArrayList<Integer>(); Queue&l...
发表于 2016-07-01 09:23:55
树的子结构
0
public boolean HasSubtree(TreeNode root1, TreeNode root2) { if (root1 == null || root2 == null) { return false; } return isSubTre...
发表于 2016-06-30 21:14:04
合并两个排序的链表
0
public ListNode Merge(ListNode list1, ListNode list2) { if (list1 == null) { return list2; } if (list2 == null) { return...
发表于 2016-06-30 10:06:28
跳台阶扩展问题
0
public class Solution { public int jumpFloorII(int target) { if (target <= 0) { return 0; } else if (target == 1) { return 1; } el...
发表于 2016-06-29 23:58:33
跳台阶
0
public class Solution { public int jumpFloor(int target) { if (target <= 0) { return 0; } else if (target == 1) { return 1; } else...
发表于 2016-06-29 23:01:52
斐波那契数列
0
public class Solution { public int Fibonacci(int n) { int[] result = { 0, 1 }; if (n < 2) { return result[n]; } int first...
发表于 2016-06-29 22:47:30
链表中倒数第k个结点
0
public ListNode FindKthToTail(ListNode head, int k) { if (head == null || k < 0) return null; ListNode p = head; ListNode q =...
发表于 2016-06-13 22:36:10
反转链表
0
迭代法: public ListNode ReverseList(ListNode head) { if (head == null || head.next == null) { return head; } ListNode next = head.ne...
发表于 2016-06-12 23:08:18
首页
上一页
1
2
3
4
5
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题