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