彭彭0909
彭彭0909
全部文章
题解
归档
标签
去牛客网
登录
/
注册
彭彭0909的博客
全部文章
/ 题解
(共3篇)
题解 | #对称的二叉树#
递归算法 public class Solution { boolean result = false; boolean isSymmetrical(TreeNode pRoot) { if(pRoot == null) return true...
2021-05-11
0
375
题解 | #二叉树的下一个结点#
1,暴力解法:直接找到根节点,然后开始中序排列,将结果储存在队列中,再取出时间复杂度:O(n)空间复杂度:O(n) public class Solution { reeLinkNode root; TreeLinkNode Node; Queuequeue = new Li...
2021-05-11
0
338
题解 | #复杂链表的复制#
\别人的答案 copy过来的 写下来主要是因为 对list要消除最后一个而sum不用消除的疑惑因为int 是基本类型,其值在递归的栈中不同,而list在栈中存的是地址,所以其内容要手动修改!! public ArrayList<ArrayList<Integer>> Find...
2021-05-10
0
364