首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
BobbyCai
武汉大学
2019届
Java工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(6)
从上往下打印二叉树
0
public class Solution { public ArrayList<Integer> PrintFromTopToBottom(TreeNode root) { ArrayList<Integer> list = new ArrayLis...
发表于 2019-03-15 17:49:02
合并两个排序的链表
0
public class Solution { public ListNode Merge(ListNode list1,ListNode list2) { if(list1==null) return list2; if(list2==null) return...
发表于 2019-03-14 22:54:47
反转链表
0
public class Solution { public ListNode ReverseList(ListNode head) { if(head==null) { return null; } ListNode p = head; Lis...
发表于 2019-03-14 19:38:55
二进制中1的个数
0
public class Solution { public int NumberOf1(int n) { int count = 0; while(n!=0) { if((n&1)==1) {//判断最后一位是不是1 ...
发表于 2019-03-14 15:45:55
用两个栈实现队列
0
import java.util.Stack; public class Solution { Stack<Integer> stack1 = new Stack<Integer>(); Stack<Integer> stack2 = new...
发表于 2019-03-14 13:46:13
重建二叉树
0
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val...
发表于 2019-03-14 13:23:04
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题