首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
郭军
西安邮电大学
2019届
Java工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(43)
序列化二叉树
0
public class Solution { String Serialize(TreeNode root) { StringBuilder builder = new StringBuilder(); return serializeCore(root, ...
发表于 2018-05-29 19:10:09
对称的二叉树
0
public class Solution { boolean isSymmetrical(TreeNode pRoot) { return isSymmetrical(pRoot, pRoot); } private boolean isSymme...
发表于 2018-05-29 14:18:35
二叉树的下一个结点
0
public class Solution { public TreeLinkNode GetNext(TreeLinkNode pNode) { if (pNode == null) return null; TreeLinkNode...
发表于 2018-05-29 12:58:04
删除链表中重复的结点
0
public class Solution { public ListNode deleteDuplication(ListNode pHead) { if (pHead == null) return null; ListNode pP...
发表于 2018-05-29 10:35:51
链表中环的入口结点
0
/** * 面试题:链表中环的入口节点 * 1.先判断链表中是否包含环,使用一快一慢两个指针,如果最终两个指针相遇,说明存在环,而相遇的这个节点也必定存在于环中 * 2.记录环中节点的数目 * 3.使用两个指针第一个指针首先走环中节点数目次,然后第二个指针和第一个指针一起走 * 4.直到两个...
发表于 2018-05-29 09:29:04
字符流中第一个不重复的字符
0
public class Solution { private int[] data = new int[256]; private int index = 1; //Insert one char from stringstream public...
发表于 2018-05-27 14:54:40
构建乘积数组
0
import java.util.ArrayList; public class Solution { public int[] multiply(int[] A) { int length = A.length; int[] B = new int[leng...
发表于 2018-05-27 11:43:21
数组中重复的数字
0
public class Solution { public boolean duplicate(int numbers[],int length,int [] duplication) { StringBuilder sb = new StringBuilder(); ...
发表于 2018-05-27 10:26:16
把字符串转换成整数
0
public class Solution { public int StrToInt(String str) { if (str.equals("") || str.length() == 0) return 0; ...
发表于 2018-05-27 10:06:30
不用加减乘除做加法
0
public class Solution { public int Add(int num1,int num2) { int sum, carry; do { sum = num1 ^ num2; carry ...
发表于 2018-05-26 15:54:22
首页
上一页
1
2
3
4
5
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题