摘要: class Solution { List<List<Integer>> result = new ArrayList<>(); public List<List<Integer>> levelOrder(TreeNode root) { if (root == null) { return res 阅读全文
posted @ 2024-02-16 21:23 予真 阅读(4) 评论(0) 推荐(0) 编辑
摘要: class Solution { // 二叉树直径 其实就是根到左子树最深+根到右子树最深 int diameter; public int diameterOfBinaryTree(TreeNode root) { calculateDepth(root); return diameter; } 阅读全文
posted @ 2024-02-16 20:46 予真 阅读(3) 评论(0) 推荐(0) 编辑
摘要: class Solution { public boolean isSymmetric(TreeNode root) { if (root == null) { return true; } return isMirror(root.left, root.right); } public boole 阅读全文
posted @ 2024-02-16 19:58 予真 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 参考链接: https://blog.csdn.net/qq_40991313/article/details/126801025?spm=1001.2014.3001.5501 3.5.3.总结描述下Direct交换机与Fanout交换机的差异? Fanout交换机将消息路由给每一个与之绑定的队列 阅读全文
posted @ 2024-02-16 17:27 予真 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-02-16 16:50 予真 阅读(2) 评论(0) 推荐(0) 编辑
摘要: // 使用匿名内部类实现接口Runnable myRunnable = new Runnable() { @Override public void run() { System.out.println("Executing myRunnable"); }};// 使用匿名内部类继承抽象类Abstr 阅读全文
posted @ 2024-02-16 11:54 予真 阅读(3) 评论(0) 推荐(0) 编辑