首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
彭彭0909
获赞
2
粉丝
0
关注
5
看过 TA
0
电子科技大学
2022
Java
IP属地:未知
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑彭彭0909吗?
发布(3)
刷题
彭彭0909
2021-05-11 20:03
Java
题解 | #对称的二叉树#
递归算法 public class Solution { boolean result = false; boolean isSymmetrical(TreeNode pRoot) { if(pRoot == null) return true; return jude(pRoot.left , pRoot.right); } public boolean jude(TreeNode root1,TreeNode root2){ if(root1 == null &&...
0
点赞
评论
收藏
转发
彭彭0909
2021-05-11 15:34
Java
题解 | #二叉树的下一个结点#
1,暴力解法:直接找到根节点,然后开始中序排列,将结果储存在队列中,再取出时间复杂度:O(n)空间复杂度:O(n) public class Solution { reeLinkNode root; TreeLinkNode Node; Queuequeue = new LinkedList(); public TreeLinkNode GetNext(TreeLinkNode pNode){ if(pNode == null) return null; root = pNode; while(root.next != null){ ro...
0
点赞
评论
收藏
转发
彭彭0909
2021-05-10 20:54
已编辑
Java
题解 | #复杂链表的复制#
\别人的答案 copy过来的 写下来主要是因为 对list要消除最后一个而sum不用消除的疑惑因为int 是基本类型,其值在递归的栈中不同,而list在栈中存的是地址,所以其内容要手动修改!! public ArrayList<ArrayList<Integer>> FindPath(TreeNode root, int target) { ans = new ArrayList<ArrayList<Integer>>(); ArrayList<Integer> list = new ArrayList<>...
0
点赞
评论
收藏
转发
1
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务